<!--  

// Site Base URL
var OLO_APP_PATH = '';
var serverURL =  OLO_APP_PATH + '/includes/orderLookupsRs.asp'
var serverURLOrgStruc =  OLO_APP_PATH + '/includes/OrgLookupRs.asp'


var isNav, isIE;

if (parseInt(navigator.appVersion) >= 3){
	//document.write("app version >=4<BR>")
	if (navigator.appName == "Netscape"){
		//document.write("app = Netscape<BR>")
		document.write('<link REL="STYLESHEET" HREF="' + OLO_APP_PATH + '/includes/stylesheets/iestyle.css" TYPE="text/css">')
		isNav = true
	} else if(navigator.appName.indexOf("Internet Explorer") >= 0){
		isIE = true
		//document.write("app = Explorer<BR>")
		document.write('<link REL="STYLESHEET" HREF="' + OLO_APP_PATH + '/includes/stylesheets/IEstyle.css" TYPE="text/css">')
	}
}
if (!isNav && !isIE){
	document.write('<link REL="STYLESHEET" HREF="' + OLO_APP_PATH + '/includes/stylesheets/IEstyle.css" TYPE="text/css">')
}


function waitForApplet(){
	while (gblnPageLoadComplete == false)
	{
	}
	/*while (document.RSAspProxyApplet.readyState != 4)
	{
	}*/
}

// Added to close the child windows once the current document changes in the browser.
  var ahwndsChildren = new Array();  
  var intChildCnt = 0 ;
 
  function addChildToOpenedList(objWin)
    
  {
  	 ahwndsChildren[intChildCnt]= objWin;
	 intChildCnt++;
  }
  
  /***** closes all the children which are stored in the array***/
  /**** Should be called in the parent window's onunload event ***/
  
  function closeChildren()
  {
	 var intChildIndex =0;
	 var objWndChild;
	 if(ahwndsChildren.length>0)
	 {
		
		for(intChildIndex=0;intChildIndex<ahwndsChildren.length; intChildIndex ++)
		{
			objWndChild =  ahwndsChildren[intChildIndex];
			objWndChild.close(); 
		}  
	 }
  }
	

	function win_openOrder(url, order_id){
		var win;
		var x;
		
		// To center the pop up Window.
		if (screen.availWidth > 790)
			x = (screen.availWidth - 790) / 2;
		else
			x = 0;
		win = window.open('', "win"+order_id, "scrollbars=yes,fullscreen=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,maximize=true,width=780,height=550,top=10,left="+x)
		document.forms[0].method = "POST";
		document.forms[0].action = url;
		document.forms[0].target = "win"+order_id;
		document.forms[0].submit();
		document.forms[0].target = "_top";
		if(arguments.length==2)
		 addChildToOpenedList(win);
	
	}
	
/*******************************************************************	
	Description:
	
	Last Modified : Aug 04
	Revision : Added to add this window to parent's child window list.

**********************************************************************/

function showHelp(){
	var objWin;	
    objWin =  window.open(OLO_APP_PATH + '/help/showHelpDoc.asp', 'Help','scrollbars=yes,fullscreen=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,maximize=true,width=600,height=400,top=100,left=100')     
    addChildToOpenedList(objWin);     
	return;
}
	

/*******************************************************************	
	Description: Function used to submit the page using the POST method
	

**********************************************************************/

function PostURL(url){

	if (document.forms[0]!= document.forms[100])
	{
	
		
		for(i=0;i<document.forms[0].elements.length;i++)
		{
			//if(document.forms[0].elements[i].type=="select-one")
			//	document.forms[0].elements[i].options[document.forms[0].elements[i].selectedIndex].value="";
			if(document.forms[0].elements[i].type=="hidden" || document.forms[0].elements[i].type=="text" )
				document.forms[0].elements[i].value="";
				
		}
		document.forms[0].action = url;
		document.forms[0].method = "POST";
		document.forms[0].target = "_top";
		document.forms[0].submit();
	}
	else
	{
		location.href = url;
	}	
}






//-->
