function CreateFancyTextarea(sNAME,sWIDTH,sHEIGHT) {
		var config = new Object();
		config.width = sWIDTH;
		config.height = sHEIGHT;
		config.bodyStyle = 'background-color: white; font-family: "Verdana"; font-size: x-small;';
		config.debug = 0;
		config.toolbar = [
		    ['fontname'],
		    ['fontsize'],
		    ['bold','italic','underline','separator'],
		    ['strikethrough','subscript','superscript','separator'],
		    ['justifyleft','justifycenter','justifyright','separator'],
		    ['Outdent','Indent','separator'],
		    ['forecolor','backcolor','separator'],
		    ['HorizontalRule','Createlink','InsertImage','InsertTable','separator','htmlmode'],
		];
		config.fontnames = {
		    "Arial":           "arial, helvetica, sans-serif",
		    "Courier New":     "courier new, courier, mono",
		    "Georgia":         "Georgia, Times New Roman, Times, Serif",
		    "Tahoma":          "Tahoma, Arial, Helvetica, sans-serif",
		    "Times New Roman": "times new roman, times, serif",
		    "Verdana":         "Verdana, Arial, Helvetica, sans-serif",
		    "impact":          "impact",
		    "WingDings":       "WingDings"
		};
		config.fontsizes = {
		    "1 (8 pt)":  "1",
		    "2 (10 pt)": "2",
		    "3 (12 pt)": "3",
		    "4 (14 pt)": "4",
		    "5 (18 pt)": "5",
		    "6 (24 pt)": "6",
		    "7 (36 pt)": "7"
		};
		config.fontstyles = [   
			{ name: "headline",     className: "headline",  classStyle: "font-family: arial black, arial; font-size: 28px; letter-spacing: -2px;" },
			{ name: "arial red",    className: "headline2", classStyle: "font-family: arial black, arial; font-size: 12px; letter-spacing: -2px; color:red" },
			 { name: "verdana blue", className: "headline4", classStyle: "font-family: verdana; font-size: 18px; letter-spacing: -2px; color:blue" }
		];
		
		//SETUP THE TEXTAREA
		editor_generate(sNAME,config);
	}

function SelectAll(sLOOKINGFA) {
		var aInput = document.forms("processFORM")
		for (i=0; i < aInput.length; i++) {
			
			if (aInput(i).name.indexOf(sLOOKINGFA) == 0) {
				aInput(i).checked = true
			}
		}
	}
	
	function DeSelectAll(sLOOKINGFA) {
		var aInput = document.forms("processFORM")
		for (i=0; i < aInput.length; i++) {
			
			if (aInput(i).name.indexOf(sLOOKINGFA) == 0) {
				aInput(i).checked = false
			}
		}
	}

 /*
     * changeClass functions (used for rollovers) etc.
     */
function formPayment()
{
	//alert("action here 2")
	//document.form.action = "figureselect.asp?Product_ID_PK=" + Pid
}
 
    function changeClass(obj, class_name) {
        original_class      = obj.className;
        original_class_obj  = obj;
        obj.className       = class_name;
        obj.onmouseout      = restoreClass;

    }

    function restoreClass(e) {
        if((typeof(original_class_obj) != 'undefined') && (typeof(original_class_obj.className) != 'undefined')) {
            original_class_obj.className = original_class;
           
        }
    }

    function overButton(e, obj){
        if(!obj) {
            if(typeof(e.srcElement) == 'undefined') {
                obj = e.currentTarget;
            } else {
                obj = e.srcElement;
            }
        }
        strValue = obj.value;
        if( obj.className == "formButton" ){
            changeClass(obj, "formButtonOver");
        }
    }
    /* ------------------------------------------- */

function ChangeProcessImage(sIMG, sOBJ)
{
	sOBJ.src = sIMG.value
}

function AddEditorImage(sIMG)
{
	var editor = document.getElementById('CE_fldMailOut_ID');
	editor.FocusDocument();
	editor.PasteHTML("<img class='IS_IMAGE' align=left style='margin-right:0' src='"+sIMG.value+"' border='0'>")
	
}

function AddEditorDocument(sIMG,sTEXT)
{
	if (sIMG.value != "")
	{
		var editor = document.getElementById('CE_fldMailOut_ID');
		editor.FocusDocument();
		var siteURL = "http://www.inhalesuite.com/"
		if (sTEXT=="")
		{
			sTEXT = "view document"
		}
	editor.PasteHTML('<a target=_blank href="'+siteURL + sIMG.value+'">'+sTEXT+'</a> ');
	}
}
	

function NahNahNah() {
	if ((event.keyCode < 48 || event.keyCode> 57) && event.keyCode != 190  && event.keyCode != 8) { 
		event.returnValue = false
	}
}	

function NahNahNahAtAll() {
	event.returnValue = false
}	

function CheckPublish(sURL) {

	var ans = confirm("This will Publish/Unpublish this item your web site, do you want to continue?")
	if (ans == false) {
		return false
	}
	else
	{
		window.location = sURL
	}
	
}

function CheckDeleteAndMove(sURL) {
	var ans = confirm("Are you sure that you want to delete this?")
	if (ans == false) {
		return false
	}
	else
	{
		window.location = sURL
	}
	
}

function CheckDeleteProductAndMove(sURL) {
	var ans = confirm("Are you sure that you want to delete this?\r\rBy deleting this Category you will be deleting:\r\r - ALL Sub Categories\r\r - ALL Products under this Category and it's Sub Categories")
	if (ans == false) {
		return false
	}
	else
	{
		window.location = sURL
	}	
}

function noGo()
{
	document.form1.txtSubject.focus();
	alert("You cannot directly change the 'To' field. Use the 'Select Groups To Send To' in the toolbox to choose your Group(s).")
}

function selectGroups()
{
	var sel = document.getElementById('MailOut1:lstGroups')
	i = sel.selectedIndex;
	
	if (!(i == -1))
	{
		var v = document.getElementById('MailOut1:lstGroups').options[i].text
		var inOf 
		inOf = v.indexOf(" (")
		v = v.substring(0,inOf)
		document.form1.txtTo.value = document.form1.txtTo.value + v + ";"
		//document.getElementById('txtToDIV').innerHTML = document.getElementById('txtToDIV').innerHTML + v + ";"
	}
	else
	{
		alert("Please select a GROUP to send to!")
	}
}
	
function ClearToBox()
{
	document.form1.txtTo.value =""
	//document.getElementById('txtToDIV').innerHTML = ""
}

function ImportForm()
{
	var s, n
	s = editor.getInnerHTML()
	n = s.indexOf("~~@")
	if (n == -1)
	{
		editor.focusEditor();
		editor.insertHTML("<img src='inhaleform.jpg' alt='~@" + document.getElementById('MailOut1_ddlForms').options.value + "~~@'>")	
	}
	else
	{
		alert("You can only import one INHALEFORM!")
	}
}

function initEditor()
{

}
	function PreviewTemplate(id,url)
		{
			var editor = document.getElementById('CE_fldMailOut_ID');
			document.form1.HTMLPreview.value = editor.getHTML();
			var sURL = url + "?id=" + id //+ "&html=" + editor.getHTML();
			window.open(sURL,'winPreview','width=800,height=600,scrollbars=1');
		}
	
		function prepareTestSend()
		{
			//document.getElementById('MailOut1_btnSend').value = 'Sending Please Wait...'
			//document.getElementById('MailOut1_btnTestSend').value = 'Sending Please Wait...'
			//document.getElementById('MailOut1_btnSend').disabled = true
			//document.getElementById('txtTo').value = document.getElementById('txtToDIV').innerHTML
			
		}
	
		function warningSave()
		{
			if (confirm("The InhaleMail system allows you to save only one version of the text for MailOuts.\nClicking OK will overwrite any previous saved MailOut text.\nClick Cancel to not save text."))
			{
				document.getElementById('txtTo').disabled = false
				return true;
			}
			else
			{
				return false;
			}
		}
		
		function checkImport()
		{
			if (document.Form1.csvList.value.length < 5)
			{
				alert("Please Select A CSV Database To Upload.")
				document.Form1.csvList.focus();
				return false;
			}
			else
			{
				if (confirm("You are about to Import a CSV Database. Additional Fields in your CSV File will be added as Custom Fields."))
				{
					//document.Form1.btnImport.disabled = true
					document.Form1.btnImport.value = "Uploading..."
					return true;
				}
				else
				{
					return false;
				}
			}
		}
		
		function warningRestore()
		{	
			if (confirm("This Will OVERWRITE Text In MailOut Editor?"))
			{
				return true;
			}
			else
			{
				return false;
			}	
		}
		
		function prepareScheSend()
		{
			var sString = ""
			sString = sString + "   .:: Please Confirm Your Scheduled Mailout Details ::.   "
			sString = sString + "\n   .:: NOTE: This will Schedule your MailOut ::."
			sString = sString + "\n\n        Scheduled Send Date/Time: " + document.form1.MailOut1_txtTime.value + " " + document.form1.MailOut1_ddlScheTime.value
			sString = sString + "\n        To: " + document.form1.txtTo.value
			sString = sString + "\n        Subject: " + document.form1.txtSubject.value
			sString = sString + "\n        MailOut Content: MailOut Editor"
			sString = sString + "\n        Template: " + document.getElementById('tmp' + get_radio_value()).innerText
			sString = sString + "\n        Salutation: " + document.form1.MailOut1_ddlSALUTATION.value + " " + document.form1.MailOut1_ddlSALUTATIONS_OPTIONS.value
			sString = sString + "\n\nClick 'OK' To Confirm And Send, 'Cancel' To Return To The MailOut Editor"
			
			if (document.form1.txtTo.value.length < 1)	
			{
				alert("To Groups Field Empty, Please Select Groups To Send To.")
				return false;
			}
			else if (document.form1.txtSubject.value.length < 1)
			{
				alert("Subject Field Empty, Please Enter MailOut Subject.")
				return false;
			}
			else if (document.form1.MailOut1_txtTime.value == '')
			{
				alert("Please select a Scheduled Date/Time to send your MailOut.")
				return false;
			}
			else
			{
				if (confirm(sString))
				{
					return true;
				}
				else
				{
					return false;
				}
			}
		}
		
		function sDeleteSend(s)
		{
			if (confirm("Are you sure?"))
			{
				location.href='Default.aspx?d=1&s=' + s
				return true;
			}
			else
			{
				return false;
			}
		}
		
		function ValidateQuickAdd()
		{
			if (document.form1.MailOut1_txtQAFirstName.value.length < 1)	
			{
				alert("First Name Field Empty, Please Enter Client First Name.")
				document.form1.MailOut1_txtQAFirstName.focus()
				return false;
			}
			else if (document.form1.MailOut1_txtQALastName.value.length < 1)
			{
				alert("Last Name Field Empty, Please Enter Client Last Name.")
				document.form1.MailOut1_txtQALastName.focus()
				return false;
			}
			var expr = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/
			var email = document.form1.MailOut1_txtQAEmailAddress.value
			if(!(expr.test(email)))
			{
				alert("Email Address Invalid.")
				document.form1.MailOut1_txtQAEmailAddress.focus();
				return false	
			}
			else if (document.form1.MailOut1_ddlQAGroupName.value == "Select Group")
			{
				alert("Group Name Field Empty, Please Select A Group To Be Added To.")
				document.form1.MailOut1_ddlQAGroupName.focus()
				return false;
			}
		}
		
		function prepareSend()
		{
			var sString = ""
			sString = sString + "   .:: Please Confirm Your Scheduled Mailout Details ::.   "
			sString = sString + "\n\n        To: " + document.form1.txtTo.value
			sString = sString + "\n        Subject: " + document.form1.txtSubject.value
			sString = sString + "\n        MailOut Content: MailOut Editor"
			sString = sString + "\n        Template: " + document.getElementById('tmp' + get_radio_value()).innerText
			sString = sString + "\n        Salutation: " + document.form1.MailOut1_ddlSALUTATION.value + " " + document.form1.MailOut1_ddlSALUTATIONS_OPTIONS.value
			sString = sString + "\n\nClick 'OK' To Confirm And Send, 'Cancel' To Return To The MailOut Editor"
			
			if (document.form1.txtTo.value.length < 1)	
			{
				alert("To Groups Field Empty, Please Select Groups To Send To.")
				return false;
			}
			else if (document.form1.txtSubject.value.length < 1)
			{
				alert("Subject Field Empty, Please Enter MailOut Subject.")
				return false;
			}
			else
			{
				if (confirm(sString))
				{
				
				}
				else
				{
					return false;
				}
					//document.getElementById('MailOut1_btnSend').value = 'Sending Please Wait...'
					//document.getElementById('MailOut1_btnTestSend').value = 'Sending Please Wait...'
					//document.getElementById('MailOut1_btnTestSend').disabled = true
					//document.form1.txtTo.disabled = false
			}
		}
		//document.form1.rTemplates[0].value
		function get_radio_value()
		{
			if (document.form1.rTemplates.value == 1)
			{
				var rad_val = 1
				return rad_val	
			}
			else
			{
				for (var i=0; i < document.form1.rTemplates.length; i++)
				{
					if (document.form1.rTemplates[i].checked)
					{
						var rad_val = document.form1.rTemplates[i].value;
						return rad_val
					}
				}
			}
		}

		function CheckDelete() {
		var ans = confirm("Are you sure that you want to delete this?")
		if (ans == false) {
			return false
		}
		else
		{
			return true
		}
		
	}
	
	function DisplayTableAuto(sTYPE) {
		Credit.style.visibility = "hidden"
		Credit.style.display = "none"
		Direct.style.visibility = "hidden"
		Direct.style.display = "none"
		
		switch (sTYPE) {
			case "CREDIT" :
				Credit.style.visibility = "visible"
				Credit.style.display = ""
				break;
			case "DIRECT" :
				Direct.style.visibility = "visible"
				Direct.style.display = ""
				break;
			
		}
	}

	function DisplayTable(sTYPE) {
		Credit.style.visibility = "hidden"
		Credit.style.display = "none"
		Cheque.style.visibility = "hidden"
		Cheque.style.display = "none"
	
		switch (sTYPE) {
			case "CREDIT" :
				Credit.style.visibility = "visible"
				Credit.style.display = ""
				break;
			case "CHEQUE" :
				Cheque.style.visibility = "visible"
				Cheque.style.display = ""
				break;
		}
		
	}

	function ShadeOut(sObj) {
		sObj.disabled = true
		sObj.value = "Processing..."
		document.forms(0).submit()
	}
	
	function NumericOnly() {
		var x = event.keyCode
		
		if ((x >= 48 && x <= 57) || (x >= 96 && x <= 105) ||(x == 8) || (x == 9)||(x == 188)||(x == 190) ) {
			event.returnValue = true
		}
		else {
			event.returnValue = false
		}
	}
	
	function OpenCalendar(ReturnTo) {
		oParentWindow = window.open("calendar/default.asp?ReturnTo=" + ReturnTo,"myCalendar","width=250,height=200,scrollbars=no",true)
		oParentWindow.focus
	}
	
	function OpenReceipt(ID) {
		oParentWindow = window.open("centre_page/reports/receipts.asp?ID=" + ID,"myReceipt","scrollbars=no",true)
		oParentWindow.focus
	}
	
	
	function MainNavigation(sIn) {
		switch (sIn){
			case "ENQUIRIES" : 
				window.location = "default.asp?page=enquiries"
				break;
			
			case "MEMBERS" : 
				window.location = "default.asp?page=members"
				break;
			case "PAYMENTS" : 
				window.location = "default.asp?page=payments"
				break;
			case "SEARCH" : 
				window.location = "default.asp?page=search"
				break;
			case "BANKING" : 
				window.location = "default.asp?page=banking"
				break;
			case "REPORTS" : 
				window.location = "default.asp?page=reports"
				break;
		    default : 
				window.location = "default.asp";
		}

	}
	
	function ResizeCenter(newWidth,newHeight) {
		if (document.layers)
		{
		  tmp1 = parent.outerWidth - parent.innerWidth;
		  tmp2 = parent.outerHeight - parent.innerHeight;
		  newWidth -= tmp1;
		  newHeight -= tmp2;
		 }
		 parent.window.resizeTo(newWidth,newHeight);
		 parent.window.moveTo((self.screen.width-newWidth)/2,(self.screen.height-newHeight)/2);
	}
	
	function ChangePassword() {
		window.open("centre_page/changepassword.asp","myPassword","scrollbars=no",true)
	}
	
	function SubNavigation(sPage,sSubpage) {
		window.location = "default.asp?page=" + sPage + "&subpage=" + sSubpage + "&New=Y"

	}
	
	
	
	function ValidateForm(sPage,sSubpage) {
		var sMissing = ""
		
		//---------------
		switch (sPage){
		//@@@@@@@@@@@@@@@
		//Enquiries pages
		case "LOGIN" : 
			if (Login.Username.value == "") {
				Login.Username.style.backgroundColor = "yellow"
				sMissing = sMissing + "\rA Username"
			}
			if (Login.Password.value == "") {
				Login.Password.style.backgroundColor = "yellow"
				sMissing = sMissing + "\rA Password"
			}
			break;
		//@@@@@@@@@@@@@@@
		//Default pages
		default : 
				sMissing = ""
		}
			
		//---------------

		if (sMissing != "") {
			alert("Please supply the following\r" + sMissing)
			return false
		}
		else {
			return true
		}
	}

function ValidateCheckout()
{
		var sMissing
		sMissing = ""
		if (form1.login_firstname.value == "") {
			sMissing = sMissing+"\nFirst Name"
		}
		if (form1.login_lastname.value == "") {
			sMissing = sMissing+"\nSurname"
		}
		if (form1.login_email.value == "") {
			sMissing = sMissing+"\nEmail Address"
		}
		
		if (form1.login_addressline1.value == "") {
			sMissing = sMissing+"\nAddress"
		}
		
		if (form1.login_city.value == "") {
			sMissing = sMissing+"\nSuburb/City"
		}
		
		if (form1.login_state.value == "") {
			sMissing = sMissing+"\nState"
		}
		if (form1.login_postcode.value == "") {
			sMissing = sMissing+"\nPostcode"
		}
		if (form1.CardHoldersName.value == "") {
			sMissing = sMissing+"\nCard Holders Name"
		}
		if (form1.CardNumber.value == "") {
			sMissing = sMissing+"\nCredit Card Number"
		}
		if (sMissing != "") {
			alert("Please supply the following\n" + sMissing)
			return false
		}
		else {
			return true
		}
}

function validateContactForm()
{
	alert("AAA")
	var sMSG
	sMSG = ""
	sMSG = "Please make sure you have completed the form correctly:\n"
	
	var expr = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/
	var email = document.form1.email.value
	if(!(expr.test(email)))
	{
		sMSG = sMSG + "\n- 'Email' is a Mandatory field"
		document.form1.email.focus();
	}
	if(document.form1.fname.value.length < 1)
	{
		sMSG = sMSG + "\n- 'First Name' is a Mandatory field"
		document.form1.fname.focus();	
	}
	if(document.form1.phone.value.length < 1)
	{
		sMSG = sMSG + "\n- 'Phone' is a Mandatory field"
		document.form1.phone.focus();	
	}
	if (sMSG == "Please make sure you have completed the form correctly:\n")
	{
		return true;
	}
	else
	{
		alert(sMSG)
		return false;	
	}
}

function Validate()
{
	if (document.form1.FirstName.value.length < 1)
	{
		alert("First Name Required.")
		document.form1.FirstName.focus();
		return false;
	}
	
	if (document.form1.LastName.value.length < 1)
	{
		alert("Surname Required.")
		document.form1.LastName.focus();
		return false;
	}
	
	var expr = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/
	var email = document.form1.Email.value
	if(!(expr.test(email)))
	{
		alert("Valid Email Address Required.")
		document.form1.Email.focus();
		return false	
	}
	
	if (document.form1.Phone.value.length < 1)
	{
		alert("Contact Phone Number Required.")
		document.form1.Phone.focus();
		return false;
	}
	
	if (document.form1.login_addressline1.value.length < 1)
	{
		alert("Delivery Address Line 1 Required.")
		document.form1.login_addressline1.focus();
		return false;
	}
	

	if (document.form1.login_city.value.length < 1)
	{
		alert("City Required.")
		document.form1.login_city.focus();
		return false;
	}
	
	if (AnyItems() == false)
	{
		alert("You Need To Order Something.")
		return false;
	}
	else
	{
		if(document.getElementById('503').value > 0)
		{
			if(document.form1.ddlPostageBox.options[document.form1.ddlPostageBox.selectedIndex].value==0)
			{
			alert("Please Select Shipping Option")
			return false;
			}
		}
		else
		{
			if(document.form1.ddlPostageSingle.options[document.form1.ddlPostageSingle.selectedIndex].value==0)
			{
			alert("Please Select Shipping Option")
			return false;
			}
		}
		
		return true
	}
}
	
	function AnyItems() {
		var iCnt = 0
		var objItems = document.getElementsByName("OrderAmount")
		for (i=0; i < objItems.length; i++) {
			if (objItems(i).value != 0) {
				iCnt = iCnt + 1
			}
		}
		
		if (iCnt == 0) {
			return false
		}
		else
		{
			return true
		}
	}	
	
	function NahNahNah() {
		event.returnValue = false
	}	
	
	function ChangePostage()
	{
		if (AnyItems() == false)
		{
			alert("You Need To Order Something.")
			if(document.getElementById('503').value > 0)
			{
				document.form1.postage.value = document.getElementById('ddlPostageBox').value
			}
			else
			{
				document.form1.postage.value = document.getElementById('ddlPostageSingle').value
			}
		}
		else
		{
			if(document.getElementById('503').value > 0)
			{
				//alert(document.getElementById('ddlPostageBox').value)
				iOldTotal = eval(document.form1.Total.value) - eval(document.form1.postage.value)
				document.form1.postage.value = document.getElementById('ddlPostageBox').value
				iTotal = eval(iOldTotal) + eval(document.form1.postage.value)
				document.form1.Total.value = iTotal.toFixed(2)	
			}
			else
			{
				//alert(document.getElementById('ddlPostageSingle').value)
				iOldTotal = eval(document.form1.Total.value) - eval(document.form1.postage.value)
				document.form1.postage.value = document.getElementById('ddlPostageSingle').value
				iTotal = eval(iOldTotal) + eval(document.form1.postage.value)
				document.form1.Total.value = iTotal.toFixed(2)
			}
		
		}
		CalculateTotal()
	}
	
	function ChangeSubTotal(sID) {
		
		if(document.getElementById('503').value > 0)
		{
			//alert("Box 20 Post")
			//Change to box 20
			document.getElementById('ddlPostageBox').style.visibility = 'visible'
			//document.getElementById('ddlPostageBox').style.position = 'relative'
			document.getElementById('ddlPostageSingle').style.visibility = 'hidden'
			//document.getElementById('ddlPostageSingle').style.position = 'absolute'
				document.form1.postage.value = document.getElementById('ddlPostageBox').value
		}
		else
		{
			//alert("Single Post")
			//Change to single
			document.getElementById('ddlPostageBox').style.visibility = 'hidden'
			//document.getElementById('ddlPostageBox').style.position = 'absolute'
			//document.getElementById('ddlPostageSingle').style.position = 'relative'
			document.getElementById('ddlPostageSingle').style.visibility = 'visible'
			
			document.form1.postage.value = document.getElementById('ddlPostageSingle').value	
		}
		
		var sCost = "Cost_" + sID
		//alert(document.form1.item(sCost).value)
		var sMin = "Minimum_" + sID
		//alert(document.form1.item(sMin).value)
		var sAmount = sID
		//alert(document.form1.item(sAmount).value)
		var sSubTotal = "SubTotal_" + sID
		
		//See what they have entered and make it a multiple of the next highest Minimum Amount
		if (eval(document.form1.item(sAmount).value) <= eval(document.form1.item(sMin).value) && document.form1.item(sAmount).value != 0) {
			document.form1.item(sAmount).value = document.form1.item(sMin).value
		}
		else {
			y = eval(document.form1.item(sAmount).value) / eval(document.form1.item(sMin).value)
			y = Math.ceil(y)
			y = eval(document.form1.item(sMin).value) * y
			document.form1.item(sAmount).value = y
		}
		
		x = document.form1.item(sAmount).value * document.form1.item(sCost).value
		document.form1.item(sSubTotal).value = x.toFixed(2)
		
		if (document.form1.item(sSubTotal).value == "NaN") {
			document.form1.item(sSubTotal).value = 0
		}
		
		CalculateTotal()
	}
	
	function ChangeShip()
	{
		var sMethod
		sMethod = ""
		sMethod = document.form1.ddlShippingMethod.options[document.form1.ddlShippingMethod.selectedIndex].value
		if (sMethod == "Air")
		{
		
		}
		else
		{
		
		}
	}
	
	function CalculateTotal() {
		
		var iTotal
		var GST
		var iTotaleNew
		
		iTotaleNew = 0
		iTotal = 0
		GST = 0
		var objSubTotals = document.getElementsByName("SubTotal")
		var objPostage = document.getElementsByName("postage")
		
		iTotal = eval(objPostage(0).value) 
		
		for (i=0; i < objSubTotals.length; i++) {
			iTotal = eval(iTotal) + eval(objSubTotals(i).value) 
			
		
			if(document.getElementById('503').value > 0)
			{
				if (document.getElementById('ddlPostageBox').value=='23' || document.getElementById('ddlPostageBox').value=='45' || document.getElementById('ddlPostageBox').value=='12' || document.getElementById('ddlPostageBox').value=='33' || document.getElementById('ddlPostageBox').value=='51' || document.getElementById('ddlPostageBox').value=='31' || document.getElementById('ddlPostageBox').value=='23')
				{
					GST = eval(iTotal) * .1
					document.form1.GST.value = GST.toFixed(2)
					//alert(document.getElementById('ddlPostageBox').value)
				}
				else
				{
					GST = 0
					document.form1.GST.value = GST.toFixed(2)
				}
			}
			else
			{
				if (document.getElementById('ddlPostageSingle').value=='9')
				{
					GST = eval(iTotal) * .1
					document.form1.GST.value = GST.toFixed(2)
					//alert(document.getElementById('ddlPostageBox').value)
				}
				else
				{
					GST = 0
					document.form1.GST.value = GST.toFixed(2)
				}	
			}
			
			
			
				iTotaleNew = eval(iTotal) + eval(GST)
				
			}
		iTotaleNew = iTotaleNew // + eval(document.form1.postage.value)
		document.form1.Total.value = iTotaleNew.toFixed(2)
		
		
	}
	
function OpenFAQa(ID) {
	
	
	var obj = document.getElementById("myFAQ"+ID)
	
	
	//------------
	if (obj.style.visibility == "visible") {
		obj.style.visibility = "hidden"
		obj.style.display = "none"
		var obj = document.getElementById("COLLAPSE"+ID)
		if (obj !== null) {
			obj.src = "http://www.inhalesuite.com/image/faq_show.gif"
		}
	}
	else {
		obj.style.visibility = "visible"
		obj.style.display = ""
		var obj = document.getElementById("COLLAPSE"+ID)
		if (obj !== null) {
			obj.src = "http://www.inhalesuite.com/image/faq_hide.gif"
		}
	}
	
	
}

function OpenFAQa(ID) {
	
	
	var obj = document.getElementById("myFAQ"+ID)
	
	//------------
	if (obj.style.visibility == "visible") {
		obj.style.visibility = "hidden"
		obj.style.display = "none"
		var obj = document.getElementById("COLLAPSE"+ID)
		if (obj !== null) {
			obj.src = "http://www.inhalesuite.com/image/faq_show.gif"
		}
	}
	else {
		obj.style.visibility = "visible"
		obj.style.display = ""
		var obj = document.getElementById("COLLAPSE"+ID)
		if (obj !== null) {
			obj.src = "http://www.inhalesuite.com/image/faq_hide.gif"
		}
	}
	
	
}
