function checkReturn(obj,e) {

 if (e.keyCode == 13 || e.which == 13) 
	{
		var form = window.document.forms[0];
		var clicknext = false;
		var nextobj;
		for ( var i=0;i < form.elements.length; i++ )
		{	
			if (form.elements[i]==obj) clicknext=true;
			
			if (clicknext) 
			{
				nextobj=form.elements[i];
				if (nextobj.type.toUpperCase()=="BUTTON" || nextobj.type.toUpperCase()=="SUBMIT") 
				{
					nextobj.click(); 
					break;
				}
			}
		} 
		return false;
	}
return true;
}

sfHover = function() {
	var sfEls = document.getElementById("GopNav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function OpenWindow(URL,w,h,px,py)
{
 mywindow = window.open(URL,"mywindow","resizable,location=1,status=1,scrollbars=1,width="+ w + ",height=" + h)
 mywindow.moveTo(px,py)
 } 

function checkReturn(obj,windowEv,ev) {

var workingEvent = null;

if (windowEv!=null) workingEvent=windowEv;
else if (ev!=null) workingEvent=ev;

 if (workingEvent.keyCode == 13 || workingEvent.which == 13) 
	{
		var form = window.document.forms[0];
		var clicknext = false;
		var nextobj;
		for ( var i=0;i < form.elements.length; i++ )
		{	
			if (form.elements[i]==obj) clicknext=true;
			
			if (clicknext) 
			{
				nextobj=form.elements[i];
				if (nextobj.type.toUpperCase()=="BUTTON" || nextobj.type.toUpperCase()=="SUBMIT") 
				{
				    nextobj.focus();
					nextobj.click(); 
					break;
				}
			}
		} 
		return false;
	}
return true;
}

function Form1_onsubmit(box) {
if(box.value=="")
	{ 
	alert("A required field found empty")
	box.focus()
	return (false)
	}
else {
	if(confirm("are you shure you want to make changes"))
		return(true)
	else 
		return(false)
	}
}

function LC_StartPage(OrderNum)
{
    var url;
    if((OrderNum != null) && (OrderNum.toString() != ''))
    {
        url = '/livechat_gop/hppcwis.dll?varUserRequest=REQ_WEBCHAT_MAIN&varUserLanguage=english&startpage=' + window.location.toString() + "&OrderNum=" + OrderNum;
    }
    else
    {
        url = '/livechat_gop/hppcwis.dll?varUserRequest=REQ_WEBCHAT_MAIN&varUserLanguage=english&startpage=' + window.location.toString();
    }
    
    return url;
}

