// JavaScript Document

  // 为ff增加innerText属性 开始
  
  var lBrowser = {};

lBrowser.agt = navigator.userAgent.toLowerCase();

lBrowser.isW3C = document.getElementById ? true:false;

lBrowser.isIE = ((lBrowser.agt.indexOf("msie") != -1) && (lBrowser.agt.indexOf("opera") == -1) && (lBrowser.agt.indexOf("omniweb") == -1));

lBrowser.isNS6 = lBrowser.isW3C && (navigator.appName=="Netscape") ;

lBrowser.isOpera = lBrowser.agt.indexOf("opera") != -1;

lBrowser.isGecko = lBrowser.agt.indexOf("gecko") != -1;

lBrowser.ieTrueBody =function (){

return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;

};

//为Firefox下的DOM对象增加innerText属性

if(lBrowser.isNS6){ //firefox innerText define

HTMLElement.prototype.__defineGetter__( "innerText",

function(){

return this.textContent;

}

);

HTMLElement.prototype.__defineSetter__( "innerText",

function(sText){

this.textContent=sText;

}

);

}
 // 为ff增加innerText属性 结束

function changeBorder(obj,n){
		if(n==1){
		$(obj).style.border = "1px solid #d85a03";
		}
		else{
		$(obj).style.border = "1px solid #cad5db";
		}
	}
	
	var checkState = "N";
	function labelStyle(pType,obj){
		if(pType=="over"){
			if(checkState == "N"){
				//alert($(obj).style.background);
				$(obj).style.background="url(http://img.zorpia.com/zorpia2/common/checkbox_hover.gif) no-repeat 0 50%;"
			}
		}
		else if(pType=="out"){
			if(checkState == "N"){
				$(obj).style.background="url(http://img.zorpia.com/zorpia2/common/checkbox_normal.gif) no-repeat 0 50%;"
			}
		}
		else if(pType=="click"){
			checkState = (checkState == "N") ? "Y" : "N";
			if(checkState == "Y"){
				$(obj).style.background="url(http://img.zorpia.com/zorpia2/common/checkbox_checked.gif) no-repeat 0 50%;"
			}
			else
			$(obj).style.background="url(http://img.zorpia.com/zorpia2/common/checkbox_hover.gif) no-repeat 0 50%;"
		}
	}