
var layeri=0;
var stopshow=0;
var timeout=0;

function moveformat(id){
if(stopshow==0){
picswin(id);
var browser=navigator.appName;
if(browser!="Microsoft Internet Explorer"){
layeri++;
document.getElementById(id).style.zIndex = layeri;
document.getElementById(id).style.left=(0+"px");
var linkid="link"+id;
alert
document.getElementById("link5pic").href=document.getElementById(linkid).href;
}
else{
document.getElementById(id).style.posLeft = 360;
layeri++;
document.getElementById(id).style.zIndex = layeri;
movestart(id);
}
}
}

function movestart(id){
	if(document.getElementById(id).style.posLeft!=0){
		var mnum=document.getElementById(id).style.posLeft*0.2;
		var x=document.getElementById(id).style.posLeft-mnum;
		document.getElementById(id).style.posLeft=x;
		moveid=id;
		setTimeout("movestart(moveid);",30);
	}else{
		var linkid="link"+id;
		document.getElementById("link5pic").href=document.getElementById(linkid).href;
	}
}

var i=1;

function showindexad(){
if (i<3 && stopshow==0){
  i++;
  var picid="l";
  picid=picid+i;
  setTimeout("moveformat('"+picid+"');showindexad();",5000);
  }
else if(stopshow==0){
  i=1;
  var picid="l";
  picid=picid+i;
  setTimeout("moveformat('"+picid+"');showindexad();",5000);
  }
else{
timeout=1;
}
}

showindexad();

function picsw(id) {
if(document.getElementById("pn"+id+"").src!="cxcs_images/p"+id+".gif"){
picswin(id);
showindexad2(id);
}
}

function picswin(id){
	document.getElementById("pnl1").src="cxcs_images/pl1a.gif";
	document.getElementById("pnl2").src="cxcs_images/pl2a.gif";
	document.getElementById("pnl3").src="cxcs_images/pl3a.gif";
	//document.getElementById("pnl4").src="cxcs_images/pl4a.gif";
	//document.getElementById("pnl5").src="cxcs_images/pl5a.gif";
	document.getElementById("pn"+id+"").src="cxcs_images/p"+id+".gif";
}

function showindexad2(id){
  stopshow=1;
  var browser=navigator.appName;
  if(browser!="Microsoft Internet Explorer"){
  layeri++;
  document.getElementById(id).style.zIndex = layeri;
  document.getElementById(id).style.left=(0+"px");
  var linkid="link"+id;
  document.getElementById("link5pic").href=document.getElementById("link"+id).href;
  }
else{
  document.getElementById(id).style.posLeft = 360;
  layeri++;
  document.getElementById(id).style.zIndex = layeri;
  movestart(id);
  }
}
function startauto(){
  stopshow=0;
  if(timeout==1){
  showindexad();
  timeout=0;
  }
}

