var cnidc = {
	$ : function(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}},
	isIE : navigator.appVersion.indexOf("MSIE")!=-1?true:false,
	addEvent : function(obj,eventType,func){if(obj.attachEvent){obj.attachEvent("on" + eventType,func);}else{obj.addEventListener(eventType,func,false)}},
	delEvent : function(obj,eventType,func){
		if(obj.detachEvent){obj.detachEvent("on" + eventType,func)}else{obj.removeEventListener(eventType,func,false)}
	}
};
function DivClickGoOther(e){
	thisObj = e.target?e.target:event.srcElement;
	do{
		if(thisObj.id == "DivGoSelect") return;
		if(thisObj.tagName == "BODY"){DivGoClose();return;};
		thisObj = thisObj.parentNode;
	}while(thisObj.parentNode);
};
function DivClickGo(){
	if(cnidc.$("DivGoTop").style.display == "block"){
		DivGoClose();
	}else{
		cnidc.$("DivGoTop").style.display = "block";
		cnidc.addEvent(document.body,"click",DivClickGoOther);
	}
};
function DivGoClose(){
	cnidc.$("DivGoTop").style.display = "none";
	cnidc.delEvent(document.body,"click",DivClickGoOther);
};
function DivGo(src){
	window.location.href = src;
	DivGoClose();
}
function DivChange(type,str){
	document.getElementById('search_type').innerHTML = str;
	document.getElementById('DivGoTop').style.display = "none";
	document.search_form.type.value = type;
}
function goUrl(url){
	window.location.href=url;
}

function searchUrl(type){
	var page = document.getElementById("page").value;
	if (page!=""){
	window.location.href(type+page);
	}
}
function listUrl(list,type){
	var page = document.getElementById("page").value;
	if (page!=""){
	window.location.href(list+"-"+page+type+".html");
	}
}


/*hideText*/
function hideText(e, conLen, str1, str2)
{
	textBox = document.getElementById(e);
	if ("" == conText)
	{
		conText = textBox.innerHTML;
	}

	if(navigator.appName.indexOf("Explorer") > -1)
	{
		if (textBox.innerText.length < conLen)
		{
			return;
		}
		textBox.innerHTML = textBox.innerText.substr(0, conLen);    
	}
	else
	{
		if (textBox.textContent.length < conLen)
		{
			return;
		}
		textBox.innerHTML = textBox.textContent .substr(0, conLen);
	}
	textBox.innerHTML += '...&nbsp;&nbsp;<span style=\'float:right width:70px;\'><a href="javascript:;" onclick="showText(\'' + e + '\',\'' + conLen + '\', \'' + str1 + '\', \'' + str2 + '\');return false" target="_self">' + str1 + '</a></span>';
	document.getElementById('contact').style.display = 'none';
}

function showText(e, conLen, str1, str2)
{
	textBox = document.getElementById(e);;
	textBox.innerHTML = conText + '&nbsp;&nbsp;<span style=\'float:right width:70px;\'><a href="javascript:;" onclick="hideText(\'' + e + '\', \'' + conLen + '\', \'' + str1 + '\', \'' + str2 + '\');return false" target="_self">' + str2 + '</a></span>';
	document.getElementById('contact').style.display = '';
}

/*hideQQ*/
function hideQQ(e)
{
	textBox = document.getElementById(e);
	if ("" == conStr)
	{
		conStr = textBox.innerHTML;
	}
	textArr = conStr.split('&nbsp;');
	
	document.getElementById(e).innerHTML = textArr[0].toString();
}

function showQQ(e)
{
	textBox = document.getElementById(e);
	if ("" == conStr)
	{
		conStr = textBox.innerHTML;
	}
	textBox.innerHTML = conStr;
	
}

