function curr(curCd,curSymb,curCode,price) {
	//var retval;
	//document.itemFrm.nProdCd.value=item;
	//document.getElementById("iteminfo").innerHTML=document.getElementById("gift" + item).innerHTML
	//retval=
	
	//window.showModalDialog("/curr.asp?curCd="+curCd+"&curSymb="+curSymb+"&price="+price,"","dialogHeight: 320px; dialogWidth: 500px; dialogTop: px; dialogLeft: px; edge: Sunken; center: Yes; help: Yes; resizable: Yes; status: No;");
	//window.showModalDialog("http://www.xe.com/pca/input.cgi?amount="+price+"&from="+curCode,"","dialogHeight: 320px; dialogWidth: 500px; dialogTop: px; dialogLeft: px; edge: Sunken; center: Yes; help: Yes; resizable: Yes; status: No;");
	
   // CurrencyWindow = window.open ('', 'CurrencyWindow', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=false,height=100,width=505')
      //CurrencyWindow.focus()
      //CurrencyWindow.location.href = "http://www.xe.com/pca/input.cgi?amount="+price+"&from="+curCode//+"//&to=ILS"
      //history.back()
    // if (window.CurrencyWindow){
    // CurrencyWindow.focus()
   //  CurrencyWindow.location.href = "/curr.asp?amount="+price+"&from="+curCode
//}
   //  else
     {
		var cx
		cx="/curr.asp?amount="+price+"&from="+curCode+"&curSymb="+curSymb
		//alert (cx);
		CurrencyWindow = window.open (cx, 'CurrencyWindow', 'toolbar=0,location=0,top=50,left=200,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,height=228,width=490')
		CurrencyWindow.pageXOffset=100
		CurrencyWindow.scrollBy(100,100)
		CurrencyWindow.focus()
		//CurrencyWindow.location.href = "/curr.asp?amount="+price+"&from="+curCode+"&curSymb="+curSymb
      }
      //history.back()
  // window.showModalDialog("curr.asp?amount="+price+"&from="+curCode)
	//"http://www.xe.com/pca/input.cgi?amount="+price+"&from="+curCode,
	//'http://www.xe.com/pca/input.cgi?amount=32&from=gbp&
	
}
function Email_check(obj) {
	var filter=/^.+@.+\..{2,4}$/
	var str=document.getElementById(obj).value


	if (str !="" ){
		if (filter.test(str)){
			var tempstring = str.split("@")
			tempstring = tempstring[1].split(".")
			//document.getElementById(put_err).innerText="";
			return true;

		} else {
			
		//alert("' " + str + " ' - Is not a valid e-mail address !\nPlease enter a valid e-mail address.")

			document.getElementById("err_mssg").innerText="Sorry, your email address is not valid !";
			document.getElementById(obj).focus();
			return false;
		
		}	
	}else{
			//document.getElementById(put_err).innerText="";
			return ture;	

	}
	
}

function Email_ondeactivate(put_err) {
//alert("s");
	var filter=/^.+@.+\..{2,4}$/
	var str=window.event.srcElement.value
	
	if (str !="" ){
		if (filter.test(str)){
			var tempstring = str.split("@")
			tempstring = tempstring[1].split(".")
			document.getElementById(put_err).innerText="";
			return true;

		} else {
			
		//alert("' " + str + " ' - Is not a valid e-mail address !\nPlease enter a valid e-mail address.")
					
			document.getElementById(put_err).innerText="Sorry, this is not a valid email address.";
			//window.event.srcElement.focus();

			return false;
		
		}	
	}else{
			document.getElementById(put_err).innerText="";	
			return true;

	}
	
}

function FSubmitValidation()
{
	//alert("s");
	var str = "";
	

	var sel_elements = document.getElementsByTagName('SELECT');
	
	// loop through all input elements in form
	for(var i = 0; i < sel_elements.length; i++) { 
	//alert(sel_elements.item(i).value);
			
		if(sel_elements.item(i).value=="" && sel_elements.item(i).getAttribute("req")=="y")
		{ //alert("hey");
			str+=sel_elements.item(i).name + "\n";
			//elements.item(i).style.background = "#F4ECEA"; 
			sel_elements.item(i).focus();
//return 0;
		}

}

	if(document.getElementById("Package")){
		var pack = document.getElementById("Package");
	
		if (pack.value==""){
			//alert("Please select a package.");
			pack.focus();
			return false;
		}	
	}


	var elements = document.getElementsByTagName('input'); 
	
	
// loop through all input elements in form
	for(var i = 0; i < elements.length; i++) { 
	
		if(elements.item(i).type=="text")
		{
			elements.item(i).style.background = "#FFFFFF";
		}
		
		if(elements.item(i).type=="text" && elements.item(i).value=="" && elements.item(i).getAttribute("req")=="y")
		{ 
			str+=elements.item(i).name + "\n";
			elements.item(i).style.background = "#F4ECEA"; 
			elements.item(i).focus();
		}
		
		
	
		
	}
	
	var text_elements = document.getElementsByTagName('textarea'); 

// loop through all input elements in form
	for(var i = 0; i < text_elements.length; i++) { 
	
		
		text_elements.item(i).style.background = "#FFFFFF";
		//alert(text_elements.item(i).value);
		//alert (elements.item(i).innerText);
		if(text_elements.item(i).value=="" && text_elements.item(i).getAttribute("req")=="y")
		{
			str+=text_elements.item(i).name + "\n";
			text_elements.item(i).style.background = "#F4ECEA"; 
			text_elements.item(i).focus();
		}
		
	}

	if (str!="")
	{	
	document.getElementById("err_mssg").innerText="Sorry, please fill in all the items marked with a: *";

//str="Sorry but these items need to be filled in:\n" + str;
//		alert (str);
		return false;
	}else{
		//alert("ok");
		return true;
	}
	
}