// NAVIGATION MOUSEOVER/MOUSEOUT METHODS
browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion); 

if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; }
else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 4.0) { roll = 'true'; }
else { roll = 'false'; }

function msover(image1,ref1) {
	if (roll == 'true') {
		document.images[image1].src = ref1;
	}//if
}//function
function msout(image1,ref1) {
	if (roll == 'true') {
		document.images[image1].src = ref1;
	}//if
}//function	


if (navigator.appVersion.indexOf("MSIE") != "-1") {
	var idx = navigator.appVersion.indexOf("MSIE");
	var iOffset = navigator.appVersion.indexOf(";",idx);
	browser_version = parseFloat(navigator.appVersion.substring(idx + 5,iOffset));
}//if

function msover2(object,style) {
		object.className = style;
}
function msout2(object,style) {
		object.className = style;
}
function LaunchOrderReceipt()
{
		window.open ("OrderReceipt.aspx?ReceiptType=ORDER", "_blank", config="toolbar=no,menubar=no,resizable=yes,height=550px, width=785px, left=50px, top=100px, scrollbars=yes");
}

function LaunchCustomerReceipt(inAccountID)
{
		window.open ("OrderReceipt.aspx?ReceiptType=CUSTOMER&CustomerID="+inAccountID, "_blank", config="toolbar=no,menubar=no,resizable=yes,height=550px, width=785px, left=50px, top=100px, scrollbars=yes");
}
function printWindow()
{
	bV = parseInt(navigator.appVersion);
	if (bV >= 4) window.print();
}
function clikker(a,b,c)
{
	//var source;
	//source = window.event.srcElement;
	if (a.style.display =="")
	{
		a.style.display = "none";
		b.src="../images/rarrow.gif";
		c.value = 0
	}
	else
	{
		a.style.display="";
		b.src="../images/darrow.gif";
		c.value = 1
	}
}

function mask(str,textbox,loc,delim)
{
	var locs = loc.split(',');

	for (var i = 0; i <= locs.length; i++)
	{
		for (var k = 0; k <= str.length; k++)
		{
			if (k == locs[i])
			{
				if (str.substring(k, k+1) != delim)
				{
					str = str.substring(0,k) + delim + str.substring(k,str.length)
				}
			}
		}
	 }
	textbox.value = str
}
function HostessCheckClick(value)
{
	window.document.all.txtFirstName.readOnly = !(value);	
	window.document.all.txtMiddleName.readOnly = !(value);	
	window.document.all.txtLastName.readOnly = !(value);	
	window.document.all.txtAddress1.readOnly = !(value);	
	window.document.all.txtAddress2.readOnly = !(value);	
	window.document.all.txtAddress3.readOnly = !(value);	
	window.document.all.txtPostalCode.readOnly = !(value);	
	window.document.all.txtEmail.readOnly = !(value);	
	window.document.all.txtPhone.readOnly = !(value);	
	window.document.all.txtShippingPhone.readOnly = !(value);
	window.document.all.txtFaxPhone.readOnly = !(value);
	window.document.all.ddlCountry.disabled = !(value);	
	window.document.all.ddlState.disabled = !(value);	
	window.document.all.ddlCounty.disabled = !(value);		
	window.document.all._JSCalendar2_txtSelectedDate.readOnly = !(value);	
	if (window.document.all.ddlCountry.selectedIndex == 0)
		window.document.all.ddlCity.disabled = !(value);	
	else
		window.document.all.txtCity.readOnly = !(value);	
	
	
}
function CustomerCheckClick(value)
{
	window.document.all.txtFirstName.readOnly = !(value);	
	window.document.all.txtMiddleName.readOnly = !(value);	
	window.document.all.txtLastName.readOnly = !(value);	
	window.document.all.txtAddress1.readOnly = !(value);	
	window.document.all.txtAddress2.readOnly = !(value);	
	window.document.all.txtAddress3.readOnly = !(value);	
//	window.document.all.txtCounty.readOnly = !(value);	
	window.document.all.txtPostalCode.readOnly = !(value);	
	window.document.all.txtEmail.readOnly = !(value);
	window.document.all.txtPhone.readOnly = !(value);
	window.document.all.txtShippingPhone.readOnly = !(value);
	window.document.all.txtFaxPhone.readOnly = !(value);	
	window.document.all.ddlCountry.disabled = !(value);	
	window.document.all.ddlState.disabled = !(value);	
	window.document.all.Jscalendar1_txtSelectedDate.readOnly = !(value);	
	if (window.document.all.ddlCountry.selectedIndex == 0)
		window.document.all.ddlCity.disabled = !(value);	
	else
		window.document.all.txtCity.readOnly = !(value);	
	if (window.document.all.ddlCountry.selectedIndex == 0)
		window.document.all.ddlCounty.disabled = !(value);	
}

function goConsultant()
{
		window.open("../General/ConsultantCorner.aspx", "_blank", "width=900, height=835, top=0, left=0, directories=yes, location=yes, menubar=yes, resizable=yes, scrollbars=yes, status=yes, titlebar=yes, toolbar=yes");
}