﻿document.writeln("<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\">");
document.writeln("<html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">");
document.writeln("<head>");
document.writeln("<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=gb2312\">");
document.writeln("<title>网页特效 首页图片切换<\/title>");
document.writeln("<style type=\"text\/css\">");
document.writeln("\/* Reset style *\/");
document.writeln("fieldset { border:none; }");
document.writeln("legend { display:none; }");
document.writeln("\/* iFocus style *\/");
document.writeln("#ifocus { width:610px; height:245px; margin:0px; border:1px solid #DEDEDE; background:#F8F8F8; }");
document.writeln(" #ifocus_pic { display:inline; position:relative; float:left; width:500px; height:225px; overflow:hidden; margin:10px 0 0 ");
document.writeln("");
document.writeln("10px; }");
document.writeln("  #ifocus_piclist { position:absolute; }");
document.writeln("  #ifocus_piclist li { width:510px; height:225px; overflow:hidden;border:none; }");
document.writeln("  #ifocus_piclist img { width:510px; height:225px; border:none;}");
document.writeln(" #ifocus_btn { display:inline; float:right; width:91px; margin:9px 9px 0 0; }");
document.writeln("  #ifocus_btn li { width:91px; height:57px; cursor:pointer; opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50); }");
document.writeln("  #ifocus_btn img { width:75px; height:45px; margin:7px 0 0 11px; }");
document.writeln("  #ifocus_btn .current { background: url(img\/ifocus_btn_bg.gif) no-repeat; opacity:1; -moz-opacity:1; filter:alpha");
document.writeln("");
document.writeln("(opacity=100); }");
document.writeln(" #ifocus_opdiv { position:absolute; left:0; bottom:0; width:505px; height:30px; background:#000; opacity:0.5; -moz-");
document.writeln("");
document.writeln("opacity:0.5; filter:alpha(opacity=50); }");
document.writeln(" #ifocus_tx { position:absolute; left:8px; bottom:8px; color:#FFF; }");
document.writeln("  #ifocus_tx .normal { display:none; }");
document.writeln("<\/style>");
document.writeln("<script type=\"text\/javascript\">");
document.writeln("function $(id) { return document.getElementById(id); }");
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("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("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("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,-225,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,-450,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,-675,5);");
document.writeln("   classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("   classCurrent(\'ifocus_btn\',\'ifocus_tx\',3);");
document.writeln("  }");
document.writeln(" }");
document.writeln("}");
document.writeln("setInterval(\'autoiFocus()\',3500);");
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,-225,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,-450,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,-675,5);");
document.writeln("  classNormal(\'ifocus_btn\',\'ifocus_tx\');");
document.writeln("  classCurrent(\'ifocus_btn\',\'ifocus_tx\',3);");
document.writeln(" }");
document.writeln(" if (currentNum==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==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("}");
document.writeln("addLoadEvent(iFocusChange);");
document.writeln("<\/script>");
document.writeln("<\/head>");
document.writeln("<body>");
document.writeln("<br \/>");
document.writeln("<div align=\"center\">");
document.writeln("<div id=\"ifocus\">");
document.writeln(" <div id=\"ifocus_pic\">");
document.writeln("  <div id=\"ifocus_piclist\" style=\"left:0; top:0;\">");
document.writeln("   <ul>");
document.writeln("    <li><img src=\"\/template\/images\/js\/pic\/pic1.jpg\" alt=\"\" border=\"0\" \/><\/li>");
document.writeln("    <li><img src=\"\/template\/images\/js\/pic\/pic2.jpg\" alt=\"\" border=\"0\" \/><\/li>");
document.writeln("    <li><img src=\"\/template\/images\/js\/pic\/pic3.jpg\" alt=\"\" border=\"0\" \/><\/li>");
document.writeln("    <li><img src=\"\/template\/images\/js\/pic\/pic4.jpg\" alt=\"\" border=\"0\" \/><\/li>");
document.writeln("   <\/ul>");
document.writeln("  <\/div>");
document.writeln("  <div id=\"ifocus_opdiv\"><\/div>");
document.writeln("  <div id=\"ifocus_tx\">");
document.writeln("   <ul>");
document.writeln("    <li class=\"current\">SEO是成本最低的网络推广方法！<\/li>");
document.writeln("    <li class=\"normal\">网络推广为您架起跟客户沟通的桥梁！ <\/li>");
document.writeln("    <li class=\"normal\">网络时代，思维最值钱！<\/li>");
document.writeln("    <li class=\"normal\">网络营销让您客户满天下！<\/li>");
document.writeln("   <\/ul>");
document.writeln("  <\/div>");
document.writeln(" <\/div>");
document.writeln(" <div id=\"ifocus_btn\">");
document.writeln("  <ul>");
document.writeln("   <li class=\"current\"><img src=\"\/template\/images\/js\/pic\/pic1.jpg\" alt=\"\" \/><\/li>");
document.writeln("   <li class=\"normal\"><img src=\"\/template\/images\/js\/pic\/pic2.jpg\" alt=\"\" \/><\/li>");
document.writeln("   <li class=\"normal\"><img src=\"\/template\/images\/js\/pic\/pic3.jpg\" alt=\"\" \/><\/li>");
document.writeln("   <li class=\"normal\"><img src=\"\/template\/images\/js\/pic\/pic4.jpg\" alt=\"\" \/><\/li>");
document.writeln("  <\/ul>");
document.writeln(" <\/div>");
document.writeln("<\/div>");
document.writeln("<\/div>");
document.writeln("<\/body>");
document.writeln("<\/html>")