//<!--


// ***Begin library code better placed in an external API***
// Set global variables for browser detection and reference building
var isNav, isIE, intervalID
var coll = ""
var styleObj = ""
if (parseInt(navigator.appVersion) >= 4) {
	if (navigator.appName == "Netscape") {
		isNav = true
	} else {
		isIE = true
		coll = "all."
		styleObj = ".style"
	}
}
// ***End library code***


// *********************** ORDER ***************************

	function order(what_)                  
		{ 	var msg = "";
			var s = "";
			var p2_ID = document.form1[what_].value;
			var qty =  document.form1["qty_" + p2_ID].value;
			//msg += "what_: " + what_ + " = " + form1[what_].value + "\n";
			//msg += "p2_ID : " + p2_ID + "\n";
			//msg += "qty : " + qty + "\n";
			//alert(msg);
			// create query string
			s = "?p2_ID=" + p2_ID + "&qty=" + qty + "&fr=prod2"
			//alert(s);
			parent.frames["data1"].location.href = "basket1.htm" + s
			//document.form1[what_].value="true";  
			//document.form1.s u b m i t ( );  
			
		 	return(true);      
		}

	var Order_what = "" // global variable that contains Order number
	function select_list(what_,height_,width_)                  
		{ 
			var res = true
			//Order_what = document.form1[what_].value // get prod number before overwriting it.
			//document.form1[what_].value="true";  
			//alert(what_ + " " + document.form1[what_].value)  
			//document.form1.submit();  

//		alert("what_  " + what_ + " Im here " )
//			alert(what_.IndexOf('addnew'))
//			if (what_.IndexOf("addnew") == -1) {
//				res = true
//			}else{
//				res = confirm(" Do yo really want to add a new category? ")
//			}

//			if (res == true) {
// 				makeNewWindow('content1_edit_tips.htm','MsgWin','resizable=yes,scrollbars=yes,status=no,width=700,height=500')
				makeNewWindow(what_,'MsgWin','resizable=yes,scrollbars=yes,status=yes,width='+width_+',height='+ height_)
//			}


		 	return(true)                      
		}


	function disp_status(status_msg) {
		DefaultStatus = status_msg;
		return true;
	}


// *********************** NEW BROWSER WINDOW ***************************

// Global variable for subwindow reference
var newWindow
// Version flag for old browsers (Nav2/IE3)
var oldStuff = parseInt(navigator.appversion) < 3
// Generate and fill the new window
function makeNewWindow(filename,winName,features,theMsg) {
	// make sure it isn't already opened

		newWindow = window.open(filename,winName,features)
		// handle Navigator 2, which doesn't have an opener property
		if (!newWindow.opener) {
			newWindow.opener = window
		}
		// delay writing until window exists in IE3
	if (!oldStuff) {
		// window is already open so bring it to the front
		var timerID;
		clearTimeout(timerID);
		timerID = setTimeout("newWindow.focus()",250);
		//alert("newWindow: " + newWindow);
		
	}
}


function writeToWindow() {
	var newContent
	// assemble content for new window
}
		

function Validate(form_, command_)
{
	//alert("form_ " + form_);
	var f = eval("document." + form_)
	document.forms[form_].command.value = command_

	f.submit()
return(true);
}


//-->
