function EnterCheck(nextfocus){

   if(event.keyCode ==13 && (nextfocus=="submit")){ 
      document.frm01.submit();
   } 

   if(event.keyCode ==13){ 
       eval('document.frm01.' + nextfocus + '.focus();');
   }
}

function goOptn(site) {
    if (site != "") 
    {
        if ( site.toUpperCase() == "NO"){}               
        else{
        	
        	if (site.indexOf("http://") > -1) 
        		NewWin = window.open(site);
        	else
            	location.href = site ;
        }
    }
}

function goFrame(target, site) {
    if (site != "") 
    {
        if (site.toUpperCase() == "NO"){}               
        else{
            eval(target + '.location.href = "' + site + '"')
            // this.selectedIndex = 0;
        }
    }
}

function goOptnF(target, site) {
    if (site != "") 
    {
        if ( site.toUpperCase() == "NO"){}               
        else{
            eval('parent.' + target + '.location.href = "' + site + '"')
        }
    }
}

function goOptnFF(target, site) {
    if (site != "") 
    {
        if ( site.toUpperCase() == "NO"){}               
        else{
            eval('parent.parent.' + target + '.location.href = site')
        }
    }
}

function winOpen(URL, winName,features)
{  
	// toolbar=no,alwaysRaised=yes,location=no,status=no,menubar=no,scrollbars=no,width=268,height=428,resizable=no,hotkey=no,dependent=yes,screenX=100,screenY=100
	wmap = window.open(URL,winName , features);
	wmap.focus();
}

function winOpend(URL, winName)
{  
	wmapd = window.open(URL,winName , 'toolbar=no,alwaysRaised=yes,location=no,status=no,menubar=no,scrollbars=yes,width=640,height=480,resizable=no,hotkey=no,dependent=yes,screenX=100,screenY=100');
	wmapd.focus;
}

function showDate(SelMonthName, SelDayName) {
	var todays = new Date();
	month = todays.getMonth();
	date = todays.getDate();
	
	//alert('SelMonthName[' + month + '].selected=true;');
	eval('SelMonthName[' + month + '].selected=true;');
	eval('SelDayName[' + (date-1) + '].selected=true;');
}

function preLoad(){
	if( !document.images ) return 	

	var i,j,k
	
	for( i=0, j=preLoad.arguments.length; i<j; i++ ){
		k = preLoad.arguments[i]
		eval( 'i_' +k+ ' = new Image()' )
		eval( 'i_' +k+ '.src = imgDir + "' +k+ '.gif"' )	
	}
}

function chkEnter(e){
	if(ie){
	var keyValue = event.keyCode;
		if (keyValue == 13){
			//alert("java script submit");
			document.frm01.submit();
		}
	}
	else if(n){
	var keyValue = e.which; 
		if ((keyValue == 13) && (document.frm01.pwd.value != "")){
			//alert("java script submit");
			document.frm01.submit();
		}
	}
}


function setCookie(name, value, expiredays){
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function getCookie(uName) {
	var flag = document.cookie.indexOf(uName+'=');
	if (flag != -1) { 
		flag += uName.length + 1
		end = document.cookie.indexOf(';', flag) 

		if (end == -1) end = document.cookie.length
		return unescape(document.cookie.substring(flag, end))
	}
}


