<!--
//-----------------------------------------
var tab_label = 1;
function tabToggle(obj) {
	var label = obj.id.split("_")[1];
	if (tab_label != label) {
		var o1 = document.getElementById("Tab_" + tab_label).src;
		var o2 = document.getElementById("Tab_" + label).src;
		document.getElementById("Tab_" + tab_label).src = o1.substring(0,o1.length-6) + o1.substring(o1.length-6,o1.length-5) + ".gif";
		document.getElementById("Tab_" + label).src = o2.substring(0,o2.length-5) + o2.substring(o2.length-5,o2.length-4) + "_.gif";
		document.getElementById("Contain_" + tab_label).style.display = "none";
		document.getElementById("Contain_" + label).style.display = "";
		tab_label = label;
		obj.blur();
	}
	else {
		obj.blur();//
		return;
	}
}
function linkTabToggle(id) {
	var label = id;
	if (tab_label != label) {
		document.getElementById("Tab_" + tab_label).className = "";
		document.getElementById("Tab_" + label).className = "ShowThisTab";
		document.getElementById("LinkContain_" + tab_label).style.display = "none";
		document.getElementById("LinkContain_" + label).style.display = "";
		tab_label = label;
	}
	else {
		return;
	}
}
function tabIndustry(obj) {
	var oLabel = obj.id.split("_")[1];
	if (tab_label != oLabel) {
		document.getElementById("InTab_" + oLabel).className = "IndustryIsThis";
		document.getElementById("InTabB_" + oLabel).className = "IndustryIsThis";
		document.getElementById("InTab_" + tab_label).className = "";
		document.getElementById("InTabB_" + tab_label).className = "";
		document.getElementById("Industry_" + tab_label).style.display = "none";
		document.getElementById("Industry_" + oLabel).style.display = "";
		tab_label = oLabel;
		obj.blur();
	}
	else {
		obj.blur();//
		return;
	}
}

function CheckPublicLogin() {
	if ($("SiteLogin_PublicMemberName").value == "") {
		alert("Please Input Your User Name!");
		$("SiteLogin_PublicMemberName").focus();
		return false;
	}
	if ($("SiteLogin_PublicMemberPWD").value == "") {
		alert("Please Input Your User Password!");
		$("SiteLogin_PublicMemberPWD").focus();
		return false;
	}
}

function checkImg(theURL, winName) {
	if (typeof(imgObj) == "object"){
		if ((imgObj.width != 0) && (imgObj.height != 0)) {
			OpenFullSizeWindow(theURL, winName, ",width=" + (imgObj.width + 20) + ",height=" + (imgObj.height + 30)); 
		}
		else {
			setTimeout("checkImg('" + theURL + "','" + winName + "')", 100);
		}
	}
}

function OpenFullSizeWindow(theURL, winName, features) {
	sBaseCmd = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,";
	if (features == null || features == ""){
		imgObj = new Image();
		imgObj.src = theURL;
		checkImg(theURL, winName);
	}
	else{
		aNewWin = window.open(theURL, winName, sBaseCmd + features);
		aNewWin.focus(); 
	}
}

function ChkImgSize(strImg, iWidth, iHeight) {
	imgObj = new Image();
	imgObj.src = strImg;
	if (imgObj.width >= iWidth){
		document.write("<img src='" + strImg + "' width='" + iWidth + "' border='0' />"); 
	}
	else if (imgObj.height >= iHeight){
		document.write("<img src='" + strImg + "' height='" + iHeight + "' border='0 />"); 
	}
	else{
		document.write("<img src='" + strImg + "' width='" + imgObj.width + "' border='0 />"); 
	}
}
//打开居中显示指定大小的窗口
function fOpenCenterWin(theURL,winName,w,h,otherFeatures){
	var x = window.screen.width - 10;
	var y = window.screen.height;
	var left,top;
	if(x > w) {
		left = (x - w) / 2;
	}
	else {
		left = 0;
	}
	if(y > h) {
		top = (y - h) / 2;
	}
	else {
		top = 0;
	}
	if(otherFeatures + '' == ''){
		otherFeatures = ",resizable=yes";
	}
	var str = "width=" + w + ",height=" + h + ",left=" + left + ",top=" + top + otherFeatures;
	window.open(theURL,winName,str);
}

function mon(d) {
	var o = d.src;
	return 	d.src = o.substring(0,o.length-5) + o.substring(o.length-5,o.length-4) + "_.gif";
}
function mout(d) {
	var o = d.src;
	return 	d.src = o.substring(0,o.length-6) + o.substring(o.length-6,o.length-5) + ".gif";
}
//-->
