document.writeln("<script>");
document.writeln("<!--");
document.writeln("var speed=30; \/\/数字越大速度越慢");
document.writeln("var tab=document.getElementById(\"demo\");");
document.writeln("var tab1=document.getElementById(\"demo1\");");
document.writeln("var tab2=document.getElementById(\"demo2\");");
document.writeln("tab2.innerHTML=tab1.innerHTML;");
document.writeln("function Marquee(){");
document.writeln("if(tab2.offsetWidth-tab.scrollLeft<=0)");
document.writeln("tab.scrollLeft-=tab1.offsetWidth");
document.writeln("else{");
document.writeln("tab.scrollLeft++;");
document.writeln("}");
document.writeln("}");
document.writeln("var MyMar=setInterval(Marquee,speed);");
document.writeln("tab.onmouseover=function() {clearInterval(MyMar)};");
document.writeln("tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};");
document.writeln("-->");
document.writeln("<\/script>");
document.writeln("");
document.writeln("<script type=\"text\/javascript\">");
document.writeln("function $(id) { return document.getElementById(id); }");
document.writeln("");
document.writeln("function addLoadEvent(func){");
document.writeln("	var oldonload = window.onload;");
document.writeln("	if (typeof window.onload != \'function\') {");
document.writeln("		window.onload = func;");
document.writeln("	} else {");
document.writeln("		window.onload = function(){");
document.writeln("			oldonload();");
document.writeln("			func();");
document.writeln("		}");
document.writeln("	}");
document.writeln("}");
document.writeln("function moveElement(elementID,final_x,final_y,interval) {");
document.writeln("  if (!document.getElementById) return false;");
document.writeln("  if (!document.getElementById(elementID)) return false;");
document.writeln("  var elem = document.getElementById(elementID);");
document.writeln("  if (elem.movement) {");
document.writeln("    clearTimeout(elem.movement);");
document.writeln("  }");
document.writeln("  if (!elem.style.left) {");
document.writeln("    elem.style.left = \"0px\";");
document.writeln("  }");
document.writeln("  if (!elem.style.top) {");
document.writeln("    elem.style.top = \"0px\";");
document.writeln("  }");
document.writeln("  var xpos = parseInt(elem.style.left);");
document.writeln("  var ypos = parseInt(elem.style.top);");
document.writeln("  if (xpos == final_x && ypos == final_y) {");
document.writeln("		return true;");
document.writeln("  }");
document.writeln("  if (xpos < final_x) {");
document.writeln("    var dist = Math.ceil((final_x - xpos)\/10);");
document.writeln("    xpos = xpos + dist;");
document.writeln("  }");
document.writeln("  if (xpos > final_x) {");
document.writeln("    var dist = Math.ceil((xpos - final_x)\/10);");
document.writeln("    xpos = xpos - dist;");
document.writeln("  }");
document.writeln("  if (ypos < final_y) {");
document.writeln("    var dist = Math.ceil((final_y - ypos)\/10);");
document.writeln("    ypos = ypos + dist;");
document.writeln("  }");
document.writeln("  if (ypos > final_y) {");
document.writeln("    var dist = Math.ceil((ypos - final_y)\/10);");
document.writeln("    ypos = ypos - dist;");
document.writeln("  }");
document.writeln("  elem.style.left = xpos + \"px\";");
document.writeln("  elem.style.top = ypos + \"px\";");
document.writeln("  var repeat = \"moveElement(\'\"+elementID+\"\',\"+final_x+\",\"+final_y+\",\"+interval+\")\";");
document.writeln("  elem.movement = setTimeout(repeat,interval);");
document.writeln("}");
document.writeln("");
document.writeln("function classNormal(iFocusBtnID,iFocusTxID){");
document.writeln("	var iFocusBtns= $(iFocusBtnID).getElementsByTagName(\'li\');");
document.writeln("	var iFocusTxs = $(iFocusTxID).getElementsByTagName(\'li\');");
document.writeln("	for(var i=0; i<iFocusBtns.length; i++) {");
document.writeln("		iFocusBtns[i].className=\'normal\';");
document.writeln("		iFocusTxs[i].className=\'normal\';");
document.writeln("	}");
document.writeln("}");
document.writeln("");
document.writeln("function classCurrent(iFocusBtnID,iFocusTxID,n){");
document.writeln("	var iFocusBtns= $(iFocusBtnID).getElementsByTagName(\'li\');");
document.writeln("	var iFocusTxs = $(iFocusTxID).getElementsByTagName(\'li\');");
document.writeln("	iFocusBtns[n].className=\'current\';");
document.writeln("	iFocusTxs[n].className=\'current\';");
document.writeln("}");
document.writeln("");
document.writeln("function iFocusChange() {");
document.writeln("	if(!$(\'ifocus\')) return false;");
document.writeln("	$(\'ifocus\').onmouseover = function(){atuokey = true};");
document.writeln("	$(\'ifocus\').onmouseout = function(){atuokey = false};");
document.writeln("	var iFocusBtns = $(\'ifocus_btn\').getElementsByTagName(\'li\');");
document.writeln("	var listLength = iFocusBtns.length;");
document.writeln("	iFocusBtns[0].onmouseover = function() {");
document.writeln("		moveElement(\'ifocus_piclist\',0,0,5);");
document.writeln("		classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("		classCurrent(\'ifocus_btn\',\'ifocus_tx\',0);");
document.writeln("	}");
document.writeln("	if (listLength>=2) {");
document.writeln("		iFocusBtns[1].onmouseover = function() {");
document.writeln("			moveElement(\'ifocus_piclist\',0,-325,5);");
document.writeln("			classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("			classCurrent(\'ifocus_btn\',\'ifocus_tx\',1);");
document.writeln("		}");
document.writeln("	}");
document.writeln("	if (listLength>=3) {");
document.writeln("		iFocusBtns[2].onmouseover = function() {");
document.writeln("			moveElement(\'ifocus_piclist\',0,-650,5);");
document.writeln("			classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("			classCurrent(\'ifocus_btn\',\'ifocus_tx\',2);");
document.writeln("		}");
document.writeln("	}");
document.writeln("	if (listLength>=4) {");
document.writeln("		iFocusBtns[3].onmouseover = function() {");
document.writeln("			moveElement(\'ifocus_piclist\',0,-975,5);");
document.writeln("			classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("			classCurrent(\'ifocus_btn\',\'ifocus_tx\',3);");
document.writeln("		}");
document.writeln("	}");
document.writeln("	if (listLength>=5) {");
document.writeln("		iFocusBtns[4].onmouseover = function() {");
document.writeln("			moveElement(\'ifocus_piclist\',0,-1300,5);");
document.writeln("			classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("			classCurrent(\'ifocus_btn\',\'ifocus_tx\',4);");
document.writeln("		}");
document.writeln("	}");
document.writeln("}");
document.writeln("");
document.writeln("setInterval(\'autoiFocus()\',5000);");
document.writeln("var atuokey = false;");
document.writeln("function autoiFocus() {");
document.writeln("	if(!$(\'ifocus\')) return false;");
document.writeln("	if(atuokey) return false;");
document.writeln("	var focusBtnList = $(\'ifocus_btn\').getElementsByTagName(\'li\');");
document.writeln("	var listLength = focusBtnList.length;");
document.writeln("	for(var i=0; i<listLength; i++) {");
document.writeln("		if (focusBtnList[i].className == \'current\') var currentNum = i;");
document.writeln("	}");
document.writeln("	if (currentNum==0&&listLength!=1 ){");
document.writeln("		moveElement(\'ifocus_piclist\',0,-325,5);");
document.writeln("		classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("		classCurrent(\'ifocus_btn\',\'ifocus_tx\',1);");
document.writeln("	}");
document.writeln("	if (currentNum==1&&listLength!=2 ){");
document.writeln("		moveElement(\'ifocus_piclist\',0,-650,5);");
document.writeln("		classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("		classCurrent(\'ifocus_btn\',\'ifocus_tx\',2);");
document.writeln("	}");
document.writeln("	if (currentNum==2&&listLength!=3 ){");
document.writeln("		moveElement(\'ifocus_piclist\',0,-975,5);");
document.writeln("		classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("		classCurrent(\'ifocus_btn\',\'ifocus_tx\',3);");
document.writeln("	}");
document.writeln("	if (currentNum==3&&listLength!=4 ){");
document.writeln("		moveElement(\'ifocus_piclist\',0,-1300,5);");
document.writeln("		classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("		classCurrent(\'ifocus_btn\',\'ifocus_tx\',4);");
document.writeln("	}");
document.writeln("	if (currentNum==4 ){");
document.writeln("		moveElement(\'ifocus_piclist\',0,0,5);");
document.writeln("		classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("		classCurrent(\'ifocus_btn\',\'ifocus_tx\',0);");
document.writeln("	}");
document.writeln("	if (currentNum==1&&listLength==2 ){");
document.writeln("		moveElement(\'ifocus_piclist\',0,0,5);");
document.writeln("		classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("		classCurrent(\'ifocus_btn\',\'ifocus_tx\',0);");
document.writeln("	}");
document.writeln("	if (currentNum==2&&listLength==3 ){");
document.writeln("		moveElement(\'ifocus_piclist\',0,0,5);");
document.writeln("		classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("		classCurrent(\'ifocus_btn\',\'ifocus_tx\',0);");
document.writeln("	}");
document.writeln("	if (currentNum==3&&listLength==4 ){");
document.writeln("		moveElement(\'ifocus_piclist\',0,0,5);");
document.writeln("		classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("		classCurrent(\'ifocus_btn\',\'ifocus_tx\',0);");
document.writeln("	}");
document.writeln("}");
document.writeln("addLoadEvent(iFocusChange);");
document.writeln("<\/script>")
