﻿function creattab(tabnum,tabid,tabname,tabcontentid,tabcontent,colorlist,delfauttab)
{
    var clist=new Array()
    document.write("<div style=\"float:left;width:100%;\">\n");
    document.write("<ul>\n");
    for(var i=1;i<=tabnum;i++)
    {
        var tid=tabid+i;
        document.write("<li id="+tid+" onmouseover=\"javascript:showDiv('"+tabcontentid+"',"+i+","+tabnum+");\" style=\"float:left;");
        if(i==delfauttab)
        {document.write("color:"+colorlist[0]+";");}
        else
        {document.write("color:"+colorlist[1]+";");}
        document.write("width:120px\">\n");
        document.write("<strong style=\"height:25px;line-height:150%;margin-top:5px;\">"+tabname[i-1]+"</strong>\n");
        document.write("</li>\n");
    }    
    document.write("</ul>\n");
    document.write("</div>\n");
    for(var i=1;i<=tabnum;i++)
    {
        var cid=tabcontentid+i;
        document.write("<div id="+cid+" style=\"");
        if(i==delfauttab)
        {document.write("display:none;");}
        else
        {document.write("display:none;");}
        document.write("width:100%\">\n");
        document.write(tabcontent[i-1]);
        document.write("</div>\n");
    }
}
function showDiv(obj,num,len)
{
 for(var id = 1;id<=len;id++)
 {
  var ss=obj+id;
  var snav =obj+"nav"+id;
  if(id==num){
	try{document.getElementById(ss).style.display="block"}catch(e){};
	try{document.getElementById(snav).style.color="#f35e1e"}catch(e){};
	try{document.getElementById(snav).style.cursor="pointer"}catch(e){};
  }else{
	try{document.getElementById(ss).style.display="none"}catch(e){};
	try{document.getElementById(snav).style.color="#2b7fe7"}catch(e){};
	try{document.getElementById(snav).style.cursor="pointer"}catch(e){};
  }
 }  
}
function showTabDiv(obj,obj2,num,len,str,str1)
{
 for(var id = 1;id<=len;id++)
 {
  var ss=obj+id;
  var snav =obj+"nav"+id;
  var tss=obj2+id;
  if(id==num){
	try{document.getElementById(ss).style.display="block"}catch(e){};
	try{document.getElementById(tss).className=str;}catch(e){};
	try{document.getElementById(tss).style.cursor="pointer"}catch(e){};
  }else{
	try{document.getElementById(ss).style.display="none"}catch(e){};
	try{document.getElementById(tss).className=str1;}catch(e){};
	try{document.getElementById(tss).style.cursor="pointer"}catch(e){};
  }
 }  
}

