﻿window.onerror = function(){return true};
function StopForAMorement(a,b,num,count)
{
a1=document.getElementById(a);
if(num>count){num=1;a1.scrollTop=0;}
setTimeout("showingt('"+a+"','"+b+"',"+num+","+count+")",5000);
}
function showingt(a1,b1,num,count)
{
if(count<2)return;
a=document.getElementById(a1);
if(a.style.backgroundColor!="white")
{
setTimeout("showingt('"+a1+"','"+b1+"',"+num+","+count+")",1000);
return;
}
b=document.getElementById(b1+num);
curwidth=0;
for(i=1;i<=num;i++)
{
if(document.getElementById(b1+i)!=null)
curwidth+=document.getElementById(b1+i).offsetHeight;
}
if(a.scrollTop > curwidth)
{
	
	StopForAMorement(a1,b1,num+1,count);
	return;
}
a.scrollTop+=2;
setTimeout("showingt('"+a1+"','"+b1+"',"+num+","+count+")",10);
}


function topbarExistsFlash(b)
{
    for(i=0;i<b.length;i++)
    {  
    
    if(b[i].length>4&&b[i].substring(b[i].length-4)==".swf")
    return b[i];
    }
    return "";
}
function creatediv(o1,o2,o3,w,h,divname)
{

    if(w>=200)
    {
        bbf=topbarExistsFlash(o1);
        if(bbf!="")return "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"960\" height=\"90\"><param name=\"movie\" value=\"http://www.gg-px.com"+bbf+"\" /><param name=\"allowFullScreen\" value=\"false\" /><embed type=\"application/x-shockwave-flash\" src=\"http://www.gg-px.com"+bbf+"\" width=\""+w+"\" height=\""+h+"\" quality=\"hight\"></embed></object>";
        str="<div id="+divname+" style=\"width:"+w+"px;height:"+h+"px;overflow:hidden\">";
        if(o1.length<1||o2.length<1||o3.lenght<1)return "";
        for(i=0;i<o1.length&&i<o2.length&&i<o3.length;i++)
        {
        str+="<a href='"+o2[i]+"'><img src='http://www.gg-px.com"+o1[i]+"' alt='"+o3[i]+"' width='"+w+"' height='"+h+"' border='0'/></a><br/>";
        }
        str+="<a href='"+o2[0]+"'><img src='http://www.gg-px.com"+o1[0]+"' alt='"+o3[0]+"' width='"+w+"' height='"+h+"' border='0'/></a><br/>";
        str+="</div>";
        return str;
    }
    else
    {
        str="<table width=\"960\" height=\"90\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"  background=\"images/index_smallpicAD_bg.gif\"><tr>";
        for(i=0;i<o1.length&&i<o2.length;i++)
        str+="<td width=\""+(960/o1.length)+"\" align=\"center\" valign=\"middle\"><a href=\""+o2[i]+"\"><img src=\"http://www.gg-px.com"+o1[i]+"\" border=\"0\" width=\""+(960/o1.length-10)+"\" height=\"90\"/></a>";
        str+="</tr></table>";
        return str;

    }
    
}
var curtimer=null;
function Animateimages(divname,h,h2)
{
   a=document.getElementById(divname);  
   if(a.scrollTop>=h)a.scrollTop=0;
   a.scrollTop+=4;
   if(a.scrollTop%h2<4)
   curtimer=setTimeout("Animateimages('"+divname+"',"+h+","+h2+")",5000);
   else
   curtimer=setTimeout("Animateimages('"+divname+"',"+h+","+h2+")",5);
}
function AnimateimagesLeft(divname)
{
   a=document.getElementById(divname);  
      if(a.style.backgroundColor=="white")
      {
      setTimeout("AnimateimagesLeft('"+divname+"')",20);
      return;
      }
    if(a.scrollLeft>=a.scrollWidth/2)a.scrollLeft=0;
   a.scrollLeft+=1; 
   setTimeout("AnimateimagesLeft('"+divname+"')",20);
}
function AnimateimagesTop(divname)
{
   a=document.getElementById(divname);  
        if(a.style.backgroundColor=="white")
      {
      setTimeout("AnimateimagesTop('"+divname+"')",50);
      return;
      }
    if(a.scrollTop>=a.scrollHeight/2)a.scrollTop=0;
   a.scrollTop++; 
   setTimeout("AnimateimagesTop('"+divname+"')",50);
}
function ChangeCurSel(o,ib,link)
{
for(i=1;i<12;i++)
{
  oo=document.getElementById("KKS"+i);
  oo.className="KKD2";
}

if(o.id=="KKS1")
{
o.style.borderTop="";
o.style.ClientHeight="36px;";
o.className="KKD1";
}
else
o.className="KKD3";
document.getElementById("KKCon").scrollTop=(ib-1)*438;
document.getElementById("KKMORE").href='/center/'+link+'/CourseList.aspx';
}