﻿function objXMLHttp() {
	var _xmlhttp;
	try {
		_xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	catch(e){
		try {
			_xmlhttp=new XMLHttpRequest();
		}
		catch(e){
			_xmlhttp=false;
		}
	}
	finally {
		return _xmlhttp;
	}
}		
function getalltext(divid,strhttp){
	var xmlhttp=new objXMLHttp();
	
	if (xmlhttp){
		xmlhttp.open("get",strhttp+"n="+Math.random(),true);
		document.getElementById(divid).innerHTML=unescape("<div><img src=/images/loading2.gif></div>");
		xmlhttp.onreadystatechange=function(){
			if (xmlhttp.readyState==4&&xmlhttp.status==200){
				document.getElementById(divid).innerHTML=unescape(xmlhttp.responseText);
			}
			else{
			}
		}
		xmlhttp.send(null);					
	}
}
function Request(strName)//调用unescape(Request(strName))
{
var strHref =location.href;
var intPos = strHref.indexOf("?");
var strRight = strHref.substr(intPos + 1); 
var arrTmp = strRight.split("&");
for(var i = 0; i < arrTmp.length; i++)
{
var arrTemp = arrTmp[i].split("=");
if(arrTemp[0].toUpperCase() == strName.toUpperCase()) return arrTemp[1];
}
return "";
}
function getclass(cssname,cssvalue){
document.getElementById(cssname).className=cssvalue;
}
function notclass(cssnameleft,csscount,cssvalue){
   for(var i=1;i<=csscount;i++){
   document.getElementById(cssnameleft+i).className=cssvalue;
   }
}


var kkjj;
function getindexclass(divid){
    if (divid=='k1'){document.getElementById(divid).className='ka1';}
    if (divid=='k2'){document.getElementById(divid).className='kb1';}
    if (divid=='k3'){document.getElementById(divid).className='kc1';}
    if (divid=='k4'){document.getElementById(divid).className='kd1';}
}
function notindexclass(divid){
    if (divid=='k1' && kkjj!='k1'){document.getElementById(divid).className='ka2';}
    if (divid=='k2' && kkjj!='k2'){document.getElementById(divid).className='kb2';}
    if (divid=='k3' && kkjj!='k3'){document.getElementById(divid).className='kc2';}
    if (divid=='k4' && kkjj!='k4'){document.getElementById(divid).className='kd2';}
}
function clickindexclass(divid){
    kkjj=divid;
    document.getElementById('k1').className='ka2';
    document.getElementById('k2').className='kb2';
    document.getElementById('k3').className='kc2';
    document.getElementById('k4').className='kd2';
    if (divid=='k1'){document.getElementById(divid).className='ka1';}
    if (divid=='k2'){document.getElementById(divid).className='kb1';}
    if (divid=='k3'){document.getElementById(divid).className='kc1';}
    if (divid=='k4'){document.getElementById(divid).className='kd1';}
}

function openalldialogD(o,w,h)
{
	var width=w;
	var height=h;
	var top=(screen.height-height)/2;
	var left=(screen.width-width)/2;
	window.open(o,"new","height="+height+",width="+width+",top="+top+",left="+left+"")
}
