<!--//

	var dataChanged=false; // tracks changes on page for exit warning
    var searchWinHeight; // used to set initial mininum height of new windows
    var searchWinMaxHeight = 500 // maximum height to allow search windows
    var searchWinInternalHeight; // additional height for ecom:allowed internal users (typicaly contact code lookup)
    var searchWinWidth; // used to set standard width of new windows
    var searchWinResultsHeight=56 // additional height for result set header  
    var searchWinResultRowHeight; // standard row height for result window
    var searchWinSystemMessageHeight = 13 // standard line height for system messages
	
    function shade(obj) {
        obj.bgColor = "#ffaaaa";
    }

    function unshade(obj) {
        obj.bgColor = "#ffffff";
    }

    function unshadeGreenBar(obj) {
        obj.bgColor = "#ffdddd";
    }

    function buttonClassNew(obj, new_style) {
        obj.className = new_style;
    }
    
    		// auto tab script:
		//  Original:  Cyanide_7 (leo7278@hotmail.com)
		//	Web Site:  http://members.xoom.com/cyanide_7 
		//	This script and many more are available free online at
		//  The JavaScript Source!! http://javascript.internet.com
		
		// DMS Modification 03/11/02:  added skip argument to jump 
		// to desired form element -- use 0 or number of form fields
		// to skip.					
	
	var isNN = (navigator.appName.indexOf("Netscape")!=-1);
	
	if (isNN) {
		document.write('<link rel=stylesheet type="text/css" href="includes/global_netscape.css">');
	} else {
		document.write('<link rel=stylesheet type="text/css" href="includes/global.css">');
	}
	
	function autoTab(input,len, e, skip) {				
		var keyCode = (isNN) ? e.which : e.keyCode; 
		var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
				
		if(input.value.length >= len && !containsElement(filter,keyCode)) {
		input.value = input.value.slice(0, len);
		var nextIndex = (getIndex(input)+1+skip) % input.form.length;
		
		if(input.form[nextIndex].type == "text")
			input.form[nextIndex].select();
		else
			input.form[nextIndex].focus();
		
		
	}

	function containsElement(arr, ele) {				
		var found = false, index = 0;
		while(!found && index < arr.length){						
			if(arr[index] == ele)
				return true;
			else
				index++;
		}
		
		return false;
	}

	function getIndex(input) {
		var index = -1, i = 0, found = false;
		while (i < input.form.length && index == -1)
			if (input.form[i] == input)
				return i;
			else 
				i++;
			
		return -1;		
	}

	return true;
	}
	// end auto-tab script		
	
	function popUpHelpWindow(topic,subtopic) {
			var helpfile='helpscreens/' + topic + '.html#' + subtopic;	
			var iMyWidth;
			var iMyHeight;
			//gets top and left positions based on user's resolution so hint window is centered.
			iMyWidth = (window.screen.width/2) - (122 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
			iMyHeight = (window.screen.height/2) - (27 + 50); //half the screen height minus half the new window height (plus title and status bars).
			var win2 = window.open("","win2","status,height=400,width=500,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
			win2.focus();
					
			win2.document.write('<frameset rows="22,*" border="0" frameborder="0" framespacing="0">')
		   	win2.document.write('<frame name="helpmenu" src="includes/helpmenu.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>')
		 	win2.document.write('<frame name="helpmain" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">')
			win2.document.write('</frameset>')
			win2.frames["helpmain"].location.replace(helpfile)
	}
	
	function exitToNewScreen(url){
		if (dataChanged==false){
			document.location = url;
			return;
		}
		if (confirm('Any changes made will be lost.\nDo you want to continue?'))
			document.location = url;
	}	
	
//-->
