// JavaScript Document
//公共function
function B(C){return document.createElement(C)}
function DE(E){document.body.removeChild(E)}
function $(id)
{
if(!document.getElementById(id)){return false;}	
return document.getElementById(id);
}

function getName(name){	
return document.getElementsByName(name);
}

function isIE(){
	 return (navigator.appVersion.indexOf("MSIE")!=-1?true:false);
	}
function isIE6(){
	 return (navigator.appVersion.indexOf("MSIE 6.0")!=-1?true:false);
	}
function getTag(ob,tag){return ob.getElementsByTagName(tag);}
function getPos(ele){
	var el = ele, left = 0, top = 0;
	do {
		left += el.offsetLeft || 0;
		top += el.offsetTop || 0;
		el = el.offsetParent;
	} while (el);
	return {'x': left, 'y': top};
}


function ajaxHTTP(){
var xmlHttp;	
try {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); 
   } catch (_e) {
      try {
         xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (_E) {    }
   }
   if (!xmlHttp && typeof(XMLHttpRequest) !="undefined") {
     try {
        xmlHttp = new XMLHttpRequest();
     } catch (e) {
        xmlHttp = false;
   		}  
   }
 return xmlHttp;  
}


function writeCookie(name, value,flag,path)
{ var expire = "";expire = new Date((new Date()).getTime()+3600000);
 expire = "; expires=" + expire.toGMTString();
 if(flag==1){document.cookie = name + "=" + escape(value) + expire+";path="+path; }
 if(flag==0){document.cookie = name + "=" + escape(value) + expire+";path="+path;}
}



function readCookie(name,flag)
{var cookieValue = "";var sea_word = name + "=";
 if(document.cookie.length > 0)
{ offset = document.cookie.indexOf(sea_word);
if (offset != -1)
{ offset += sea_word.length;
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
if(flag==1){cookieValue = unescape(document.cookie.substring(offset, end));}
if(flag==0){cookieValue = (document.cookie.substring(offset, end));}
 } }
return cookieValue;
}



/*
function count(){
	if(readCookie('clickCount',0)==''){
		 writeCookie('clickCount',1,1,"/"); //点击次数 
		 writeCookie('showCount',0,1,"/"); //信息显示次数(只显示3次)
		}
	else{
		 var cc=parseInt(readCookie('clickCount',1));
		 cc+=1;
		  writeCookie('clickCount',cc,1,"/");
		}	
	}
	*/
	
	

