<!--
var iAppMi = window.navigator.appName.toLowerCase().indexOf("microsoft");
var theform;

if (iAppMi > -1) {
	theform = document.Form1;
}else{
	theform = document.forms["Form1"];
}

function OpenPopup(Url,NameP,PWid,Phei) {
		var features = 
			'width='        + PWid +
			',height='      + Phei +
			',top=200' +
			',left=500' +
			',directories=o' +
			',location=o' +
			',menubar=o'  +
			',scrollbars=o' +
			',status=0' +
			',toolbar=o' +
			',Resizable=o';
		window.open(Url,"P"+NameP,features);
	}

function OpenModalDialog(Url,NameP,PWid,Phei) {
	var Features = 
		'dialogWidth:'	+ PWid + 'px;' + 
		'dialogHeight:'	+ Phei + 'px;' +
		'edge:Raised;center:Yes;help:No;Resizable:Yes;Maximize:Yes';
	window.showModalDialog(Url,NameP,Features);
	window.location.reload(); 
}

function initCombo(UsrCtrlN)
{
	populate(UsrCtrlN);
	/*
	
	if (iAppMi > -1) {
		//lgth = document.all[UsrCtrlN + "DDLSFamily"].options.length - 1;
		//document.all[UsrCtrlN + "DDLSFamily"].options[lgth] = null;
		populate(UsrCtrlN);
		//if (document.all[UsrCtrlN + "DDLSFamily"].options[lgth]) optionTest = false;
	}
	else {
		lgth = window.document.getElementById[UsrCtrlN + "DDLSFamily"].options.length - 1;
		window.document.getElementById[UsrCtrlN + "DDLSFamily"].options[lgth] = null;
		if (window.document.getElementById[UsrCtrlN + "DDLSFamily"].options[lgth]) optionTest = false;
	}
	*/
}



function populate(UsrCtrlN)
{
	//if (!optionTest) return;
	if (iAppMi > -1) {
		var box = document.all[UsrCtrlN + "DDLFamily"];
		var box2 = document.all[UsrCtrlN + "DDLSFamily"];
	}
	else {
		var box = window.document.getElementById[UsrCtrlN + "DDLFamily"];
		var number = window.document.getElementById[UsrCtrlN + "DDLSFamily"];
	}
	var number = box.options[box.selectedIndex].value;
	
	if (!number) return;
	var list = subcateg[number];
	
	box2.options.length = 0;
	for(i=0;i<list.length;i+=2)
	{
		box2.options[i/2] = new Option(list[i],list[i+1]);
	}
}


function doPostBack(myObj, myVal) {
		var theform;
		var iAppMi = window.navigator.appName.toLowerCase().indexOf("microsoft");
		
		if (iAppMi > -1) {
			theform = document.Form1;
		}
		else {
			theform = document.forms["Form1"];
		}
		
		if(myObj=="SCRRate"){
			if (iAppMi > -1) {
				myVal = document.all["SCRRate"].value;
			}else {
				myVal = window.document.getElementById["SCRRate"].value;
			}
		}
		
		theform.MyObject.value = myObj; //eventTarget.split("$").join(":");
		theform.MyValue.value = myVal;
		theform.submit();
	}
//-->
