
	function go_to_myorder()
	{
		var quantity = document.dorderform.qty.value;
		//alert(quantity);

		if(quantity == '' || quantity == false)
		{
			alert("Please fill in quantity");
			exit;
		}

		document.dorderform.submit();
	}

	function checkInputString()
	{
		var q = document.searchform.q.value;
		//alert(q);

		if(q == '' || q == false)
		{
			alert("Please fill in search query");
			return false;
		}

		return true;
	}

	function checkTermsSelectionInPopup(){

		var CheckBoxChecked = document.checkoutform_popup.IsAgree.checked;
		//alert(CheckBoxChecked);

		if(CheckBoxChecked == false)
		{
			alert("Please agree to our terms and conditions");
			return false;
		}
		else
		{
			//Get the values of the parent form.
			var ParentDocument = window.opener.document;

			if(window.opener && !window.opener.closed){
				ParentDocument.checkoutform.IsAgree.checked	= true;
				this.close();
			}
		}
	}

	function checkTermsSelection(){

		var CheckBoxChecked = document.checkoutform.IsAgree.checked;
		//alert(CheckBoxChecked);

		if(CheckBoxChecked == false)
		{
			var url = "terms_and_conditions_popup.php";
			//alert(url);

			popUpWindow(url,100,200,600,150);
			return false;
		}

		return true;
	}

	var popUpWin = 0;
	function popUpWindow(URL, left, top, width, height){

		if(popUpWin && !popUpWin.closed)
		{
			popUpWin.close();
		}

		popUpWin = open(URL, 'popUpWin', 'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=no, width='+width+', height='+height+', left='+left+', top='+top+'');
	}
