var faqWin;    function gotoFAQLabel(lbl)  {    if(faqWin == null || faqWin.closed)    {   			faqWin = window.open('', 'faq_win', 'menubar=no,status=no,scrollbars=yes,resizable=yes,width=450,height=500,toolbar=no,location=no,directories=no');		}    faqWin.document.location.href = 'https://www.securepaynet.net/gdshop/auth.asp?isc=&se=%2B&from%5Fapp=&prog%5Fid=amarques&pl%5Fid=1020&target=faq%2Easp#' + lbl;    faqWin.focus();    return false;  }   function gotoRNFAQ()  {    if(faqWin == null || faqWin.closed)    {   			faqWin = window.open('http://support.secureserver.net/cgi-bin/wwd.cfg/php/enduser/std_alp.php', 'faq_win', 'menubar=no,status=no,scrollbars=yes,resizable=yes,width=800,height=400,toolbar=yes,location=no,directories=no');		}    faqWin.focus();     return false;  } function closeWindow(x)  // close this window and redirect main window  {  opener.location.href = x;  window.close();  }function ShowInfo(subject){	Win1 = window.open("hosting_showInfo_mdl.asp?subject=" + subject,"Storage","left=200,top=50,resizable=yes,scrollbars=yes,width=245,height=200");}function submitForm(){	var hasQty = false;	var cnt = 0;	var frm = document.PurchaseHosting;	var months = 0;	var tfQty = 0;			months = frm.months1.options[frm.months1.selectedIndex].value;	if ((frm.hosting1.options[frm.hosting1.selectedIndex].value > 0) || (months > 0)) 	{		hasQty = true;		if (months==0){months=1};		for (var i=1; i <= frm.hosting1.options[frm.hosting1.selectedIndex].value; i++)		{			frm.elements['item_' + i].value = 1;			frm.elements['qty_' + i].value = months;		}		if ((frm.elements['item_1'].value == 0) && (months > 0)) 		{			frm.elements['item_1'].value = 1;			frm.elements['qty_1'].value = months;		}		if (frm.qty_41)		{			if (frm.item_41.checked == true)			{ 				tfQty = i-1 				if (tfQty==0){tfQty=1};				frm.elements['qty_41'].value = tfQty;				frm.elements['duration_41'].value = months;			}		}		if (frm.qty_45)		{			if (frm.item_45.checked == true)			{ 				tfQty = i-1 				if (tfQty==0){tfQty=1};				frm.elements['qty_45'].value = tfQty;				//frm.elements['duration_45'].value = months;			}		}	}		months = frm.months2.options[frm.months2.selectedIndex].value;	if ((frm.hosting2.options[frm.hosting2.selectedIndex].value > 0) || (months > 0)) 	{		hasQty = true;		if (months==0){months=1};		for (var i=1; i <= frm.hosting2.options[frm.hosting2.selectedIndex].value; i++)		{			cnt = (i+10);			frm.elements['item_' + cnt].value = 1;			frm.elements['qty_' + cnt].value = months;		}		if ((frm.elements['item_11'].value == 0) && (months > 0)) 		{			frm.elements['item_11'].value = 1;			frm.elements['qty_11'].value = months;		}		if (frm.qty_42)		{			if (frm.item_42.checked == true)			{				tfQty = i-1 				if (tfQty==0){tfQty=1};				frm.elements['qty_42'].value = tfQty;				frm.elements['duration_42'].value = months;			}		}		if (frm.qty_46)		{			if (frm.item_46.checked == true)			{				tfQty = i-1 				if (tfQty==0){tfQty=1};				frm.elements['qty_46'].value = tfQty;				//frm.elements['duration_46'].value = months;			}		}	}		months = frm.months3.options[frm.months3.selectedIndex].value;	if ((frm.hosting3.options[frm.hosting3.selectedIndex].value > 0) || (months > 0)) 	{		hasQty = true;		if (months==0){months=1};		for (var i=1; i <= frm.hosting3.options[frm.hosting3.selectedIndex].value; i++)		{			cnt = (i+20);			frm.elements['item_' + cnt].value = 1;			frm.elements['qty_' + cnt].value = months;		}		if ((frm.elements['item_21'].value == 0) && (months > 0)) 		{			frm.elements['item_21'].value = 1;			frm.elements['qty_21'].value = months;		}		if (frm.qty_43)		{			if (frm.item_43.checked == true)			{				tfQty = i-1 				if (tfQty==0){tfQty=1};				frm.elements['qty_43'].value = tfQty;				frm.elements['duration_43'].value = months;			}		}		if (frm.qty_47)		{			if (frm.item_47.checked == true)			{				tfQty = i-1 				if (tfQty==0){tfQty=1};				frm.elements['qty_47'].value = tfQty;				//frm.elements['duration_47'].value = months;			}		}	}		months = frm.months4.options[frm.months4.selectedIndex].value;	if ((frm.hosting4.options[frm.hosting4.selectedIndex].value > 0) || (months > 0)) 	{		hasQty = true;		if (months==0){months=1};		for (var i=1; i <= frm.hosting4.options[frm.hosting4.selectedIndex].value; i++)		{			cnt = (i+30);			frm.elements['item_' + cnt].value = 1;			frm.elements['qty_' + cnt].value = months;		}		if ((frm.elements['item_31'].value == 0) && (months > 0)) 		{			frm.elements['item_31'].value = 1;			frm.elements['qty_31'].value = months;		}		if (frm.qty_44)		{			if (frm.item_44.checked == true)			{				tfQty = i-1 				if (tfQty==0){tfQty=1};				frm.elements['qty_44'].value = tfQty;				frm.elements['duration_44'].value = months;			}		}		if (frm.qty_48)		{			if (frm.item_48.checked == true)			{				tfQty = i-1 				if (tfQty==0){tfQty=1};				frm.elements['qty_48'].value = tfQty;				//frm.elements['duration_48'].value = months;			}		}	}				//alert(frm.elements['qty_45'].value);				//alert(frm.elements['qty_46'].value);				//alert(frm.elements['qty_47'].value);				//alert(frm.elements['qty_48'].value);		if (hasQty == true)	{		if (frm.Iagree.checked == true)		{			frm.submit();		}		else		{			alert("You must indicate agreement to the Hosting Terms and Conditions.");			frm.Iagree.focus();		}	}	else	{		alert("You have not selected any products to order.");	}}function PurchaseClick(){	var frm = document.frmBasket;	var item = 4;	var varName;	var tCount = 0;	var productSelected = false;	if (document.frmBasket.Iagree.checked == true)	{		if (frm.backorder_qty.options[frm.backorder_qty.selectedIndex].value > 0)		{			productSelected = true;			for (var i=0; i < frm.backorder_qty.options[frm.backorder_qty.selectedIndex].value; i++)			{				varName = 'item_' + item;				frm.elements[varName].value = 1;				frm.elements['qty_' + item].value = 1;				item++;				tCount++;			} 			frm.action = 'https://www.securepaynet.net/gdshop/offers/cross_sell.asp?isc=&se=+&from_app=&prog_id=amarques&shopper_id=&showonly=9&header=5&mscssid=3121670';		} else {			frm.action = 'https://www.securepaynet.net/gdshop/xt_orderform_addmany.asp?isc=&se=+&from_app=&prog_id=amarques&mscssid=3121670';		}		if (frm.duration_3.options[frm.duration_3.selectedIndex].value > 0)		{			productSelected = true;			frm.item_3.value = 1;			frm.qty_3.value = 1;			tCount++;		}					tCount += parseInt(frm.qty_1.options[frm.qty_1.selectedIndex].value);		tCount += parseInt(frm.qty_2.value);				if (frm.qty_1.options[frm.qty_1.selectedIndex].value > 0 )		{			productSelected = true;		}				if (frm.qty_2.value > 0 )		{			productSelected = true;		}				//frm.Tcount.value = tCount;		frm.Tcount.value = '13';				if (productSelected) 		{			document.frmBasket.submit();		} 		else		{			alert('To purchase, please select a DomainAlert option.');		}			}	else	{		alert("To purchase, you must agree to the DomainAlert License Agreement.");	}}
