function userAgentChk() {
	var userAgent	= navigator.userAgent;
    if(userAgent.indexOf("MSIE") != -1){
        this.isIE			= true;
		this.agentVer	= userAgent.charAt(userAgent.indexOf("MSIE") + 5);
		if (this.agentVer == 4) this.isIE4 = true;
		else if (this.agentVer == 5) this.isIE5 = true;
		else if (this.agentVer == 6) this.isIE6 = true;
		else if (this.agentVer == 7) this.isIE7 = true;
    }else if(userAgent.indexOf("Mozilla") != -1 && userAgent.indexOf("compatible") == -1){
        this.isNav = true;
		this.agentVer	= userAgent.charAt(UA.indexOf("Mozilla") + 8);
        if(agentVer == 4 ) this.isNav4 = true;
        else if(agentVer == 5 ) this.isNav5 = true;
        else if(agentVer == 6 ) this.isNav6 = true;
        else if(agentVer == 7 ) this.isNav7 = true;
    }
}
var uaBc = new userAgentChk();
function getCookie( name ) {
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length ) 	{
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
			break;
	}
	return "";
}
function setCookie( name, value, expiredays ) {
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString()  + ";"
}
function setCookieMethod( objCheckBox, strPopName, intPopDate ) {
	if ( objCheckBox.checked ) {	setCookie( strPopName,"NoPop",intPopDate);self.close();}
}
function setCookieMethod_ImageType( objCheckBox, strPopName, intPopDate ) {
	if ( objCheckBox ) {	setCookie( strPopName,"NoPop",intPopDate);self.close();}
}
function popupWindowOpen(winPath, winName, winWidth, winHejght) {
	if (getCookie(winName) != "NoPop") {MM_openBrWindow(winPath,winName,'width='+winWidth+',height='+winHejght);}	
}

function popupWindowOpen_Option(winPath, winName, option, winWidth, winHejght) {
	if (getCookie(winName) != "NoPop") {MM_openBrWindow(winPath,winName, option + ' ,width='+winWidth+',height='+winHejght);}	
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function setCookieMethod_Layer( strPopName, intPopDate ) {
	setCookie( strPopName,"NoPop",intPopDate);self.close();
}


