/****************************************************************
函数功能：xmlhttp的调用
参数说明：pageurl链接地址
作者：    刘晓逸
*****************************************************************/
function exec_webservice(pageurl){
  try{
				 var xmldom = new ActiveXObject("Microsoft.XMLHTTP");
				 //xmldom.async=false;
				 xmldom.open("GET", pageurl, false);
				 xmldom.send();
				 if(xmldom.readyState>2){
				    return(xmldom.responseXML);
				      }
	    }
	catch(e){ var xmlHttpReq = new XMLHttpRequest();
						 xmlHttpReq.open("GET", pageurl, false);
						 xmlHttpReq.send(null);
						 if(xmlHttpReq.readyState>2){
							   return(xmlHttpReq.responseXML);
						 }
	}
}

/****************************************************************
函数功能：跑马灯
参数说明：id是要显示的div的id，id1是第一个div的id，id2是第二个div的id，sp是速度
作者：    刘晓逸
*****************************************************************/
function cls_marquee(id,id1,id2,sp){
		  this.obj_id=id;
		  this.obj_id1=id1;
		  this.obj_id2=id2;
		  this.speed=sp;
		  eval(this.obj_id2+".innerHTML="+this.obj_id1+".innerHTML");
		  
		   function Marquee(){
		     if(eval(id2).offsetTop-eval(id).scrollTop<=0)
	             eval(id).scrollTop-=eval(id1).offsetHeight
	         else{
	             eval(id).scrollTop++
	           }
            }
         var MyMar=setInterval(Marquee,sp)
         eval(this.obj_id).onmouseover=function() {clearInterval(MyMar)}
         eval(this.obj_id).onmouseout=function() {MyMar=setInterval(Marquee,sp)}
		} 


/****************************************************************
函数功能：建立图片控制类controlimg
作者：    刘晓逸
*****************************************************************/

function controlimg(imgid)
{
  this.objid=imgid;
  this.imgnum=0;
  this.imgarr=new Array();  
}

controlimg.prototype.add=addimg;
controlimg.prototype.loadpic=preload;
controlimg.prototype.convert=changeimg;

function addimg(imgsrc,href)
{
  this.imgarr[this.imgarr.length]={
  "imgsrc":imgsrc,
  "href":href
  }
}

function preload(){
 for(i=0;i<this.imgarr.length;i++)
 {
   eval("img_"+this.objid+"_"+i+"=new Image()");
   eval("img_"+this.objid+"_"+i+".src=this.imgarr[i].imgsrc");
 } 
}

function changeimg(picpos)
{
  if(this.imgnum>=this.imgarr.length)
  {
    this.imgnum=0;
  }
 /* if(picpos.length!=0)
  {
     this.imgnum=Math.round(picpos);
  }*/
  var obj_img=document.getElementById(this.objid);
  obj_img.style.filter=(obj_img.style.filter=="revealTrans")?"revealTrans":"blendTrans";
  obj_img.style.filter.duration = 3.0000;
  obj_img.style.filter.transition = 23;
  obj_img.filters(0).apply();
  obj_img.src=this.imgarr[this.imgnum].imgsrc;
  obj_img.parentNode.href=this.imgarr[this.imgnum].href;
  obj_img.filters(0).play();
  this.imgnum=this.imgnum+1;
  //window.setTimeout("changeimg()",3000);
}

/****************************************************************
函数功能：tag转换类turntag
作者：    刘晓逸
*****************************************************************/

function turntag()
{
  this.tagarr=new Array();  
}

turntag.prototype.add=function(tagid,ptagid,ptagback,ptagback1){
    this.tagarr[this.tagarr.length]={
    "tagid":tagid,
    "ptagid":ptagid,
	"ptagback":ptagback,
	"ptagback1":ptagback1
    }
}

turntag.prototype.turn=function(tagid){
	for(i=0;i<this.tagarr.length;i++)
    {
	  if(this.tagarr[i].tagid!=tagid){
        document.getElementById(this.tagarr[i].tagid).style.display='none';
	    document.getElementById(this.tagarr[i].ptagid).style.backgroundImage="url("+this.tagarr[i].ptagback+")";
		
      }
      else{
		 
        document.getElementById(this.tagarr[i].tagid).style.display='block';
	document.getElementById(this.tagarr[i].ptagid).style.backgroundImage="url("+this.tagarr[i].ptagback1+")";
	
      }
    }
}

/****************************************************************
函数功能：消除开始有字的文本框的原始字
作者：    刘晓逸
*****************************************************************/
function clearvalue(){
   this.flg=0;  
}
clearvalue.prototype.changevalue=function(obj_id){
  if(this.flg!=1){
    obj_input=document.getElementById(obj_id);
    obj_input.value="";
    this.flg=1;
    }
}

/****************************************************************
常量功能：设置网站目录
作者：    刘晓逸
*****************************************************************/

var website="http://www.ic36.com"