//preload swap images

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//error

function SymError()
{
  return true;
}

window.onerror = SymError;

//mouse trailer

var x, y;
var step = 10;
var flag = 0;
var Message_Mouse = 'E-commerce sites so easy now!'+' '; width_font = 20; height_font = 20;
Message_Mouse = Message_Mouse.split('');
NumLayer_Mouse  = Message_Mouse.length;
var xpos = new Array();
for (i = 0; i <= Message_Mouse.length - 1; i++) {
xpos[i] = -50;
}
var ypos = new Array();
for (i = 0; i <= Message_Mouse.length - 1; i++) {
ypos[i]= -50;
}
function handlerMM(e) {
x = (document.layers) || ((!document.all)&&(!document.layers))  ? e.pageX : document.body.scrollLeft + event.clientX;
y = (document.layers) || ((!document.all)&&(!document.layers))  ? e.pageY : document.body.scrollTop + event.clientY;
flag = 1;
}
if ((document.layers) || ((!document.all)&&(!document.layers)))  {
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
function Effect_Mouse() {
if (flag == 1 && document.all) {
for (i = Message_Mouse.length - 1; i >= 1; i--) {
xpos[i] = xpos[i - 1] + step;
ypos[i] = ypos[i - 1];
}
xpos[0] = x + step;
ypos[0] = y;
var width_bg = document.body.clientWidth;
var height_bg = document.body.clientHeight;
for (i = 0; i < NumLayer_Mouse - 1; i++)
{   var thisspan = eval('span' + (i) + '.style');
if ((xpos[i] <  (width_bg-width_font)) && (ypos[i] < (height_bg-height_font)))
{   thisspan.posLeft = xpos[i]; thisspan.posTop = ypos[i];  thisspan.visibility = 'visible';    }
else    {   thisspan.visibility = 'hidden'; }
}
}
if (flag==1 && document.layers) {
for (i = Message_Mouse.length - 1; i >= 1; i--) {
xpos[i] = xpos[i - 1] + step;
ypos[i] = ypos[i - 1];
}
xpos[0] = x + step;
ypos[0] = y;
var height_bg = window.innerHeight;
var width_bg = window.innerWidth;
for (i = 0; i < NumLayer_Mouse - 1; i++) {
var thisspan = eval('document.span' + i);
if ((xpos[i] <  (width_bg-width_font)) && (ypos[i] < (height_bg-height_font)))
{ thisspan.left = xpos[i];  thisspan.top = ypos[i]; thisspan.visibility = 'visible';    }
else    {   thisspan.visibility = 'hidden'; }
}
}
if ((flag == 1) && ((!document.all)&&(!document.layers))) {
for (i =NumLayer_Mouse - 1; i >= 1; i--) {
xpos[i] = xpos[i - 1] + step;
ypos[i] = ypos[i - 1];
}
xpos[0] = x + step;
ypos[0] = y;
var width_bg = window.innerWidth;
var height_bg = window.innerHeight;
for (i = 0; i < NumLayer_Mouse - 1; i++) {
var thisspan = document.getElementById('span'+i);
if ((xpos[i] <  (width_bg-width_font)) && (ypos[i] < (height_bg-height_font)))
{   thisspan.style.left = xpos[i];
thisspan.style.top = ypos[i];
thisspan.style.visibility = 'visible';  }
else    {   thisspan.style.visibility = 'hidden';   }
}
}
}

//alpha

function checkAlp(alpha)
{    if (alpha == '<')   { return '&lt';}
else if (alpha == '>')  { return '&gt';}
else if (alpha == '&')  { return '&amp';}
else if (alpha == '"')  { return '&quot';}
else return alpha;
}
 function initial()
{  if (document.all)
   {  
}
if (document.layers){
   }
   Main();
}

function Main(){
     Effect_Mouse();
     setTimeout('Main()', 10);
}
window.onload = initial;