﻿var layers = document.layers;
var style = document.all;
var both = layers || style;
var huliguo_b = 0;
var huliguo_c = 4;
function writeOnText(obj, str) {
if (layers) with (document[obj]){
document.open();
document.write(str);
document.close();
}
if (style) eval(obj+'.innerHTML= str');
}
var dispStr = new Array("热烈庆祝西桥模具厂创办14周年！西桥模具学校成立8周年！                            ","学模具到西桥，好工作在眼前!中山西桥职业技能培训学校是广东地区最专业的模具培训基地之一!                            ",
"“校训：立德 树人”“办学宗旨：诚信办学 优质服务 专职专业 和谐西桥”“教学理念：师以生为本”                          ",
"实事求是，敢为人先是西桥人执着追求的基本准则!                          ",
"");
function txtTyper(str, idx, idObj, spObj, clr1, clr2, delay){
var tmp0 = tmp1 = ''
var skip =200;
if (both && idx <= str.length){
if (str.charAt(idx) == '<'){while (str.charAt(idx) != '>') idx++; idx++;}
if (str.charAt(idx) == '&' && str.charAt(idx+1) != ' ') {while (str.charAt(idx) != ';') idx++; idx++;}
tmp0 = str.slice(0,idx);
tmp1 = str.charAt(idx++);
writeOnText(idObj, "<span class="+spObj+"><font color='"+clr1+"'><b>"+tmp0+"</b></font><font color='"+clr2+"'>"+tmp1+"</font></span>");
setTimeout("txtTyper('"+str+"', "+idx+", '"+idObj+"', '"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+")",delay);
}
else{
huliguo_b++;
init();
}
}

function init(){
if (huliguo_b == huliguo_c) huliguo_b = 0;
txtTyper(dispStr[huliguo_b], 0, 'ttl0', 'ttl1', '#255eaf', '#5d77c4', 120);
}