payImg=null;var loc=document.location.href.toLowerCase();var server=getServerName(document.location.href);// Declaring required variablesvar digits = "0123456789";// non-digit characters which are allowed in phone numbersvar phoneNumberDelimiters = "()- ";// characters which are allowed in international phone numbers// (a leading + is OK)var validWorldPhoneChars = phoneNumberDelimiters + "+";// Minimum no of digits in an international phone no.var minDigitsInIPhoneNumber = 10;String.prototype.trim = function(){	return this.replace( /^\s+|\s+$/g, '' );}function checkEnterSearch(event,obj) {	{		if(event.keyCode==13){			// perform the search check			doSearch(obj);		}		}}function clearDefault(obj) {	if (obj.value=='Search the site...') {		obj.value='';	}	}function setUsername(strText) {	var regEx = /@/g;	if (strText.indexOf("@") > 0) {	var newStr = strText.replace(regEx, "~");	var finalStr = newStr.toLowerCase();  	}	else {	var finalStr = strText; 	}	document.forms[0].Username.value = changeCase(finalStr)}function getServerName(surl) {	// takes surl and fetches the server name	var index1=surl.indexOf("//");	if (index1 !=-1) {		surl=surl.substring(index1+2,surl.length);			if (surl.indexOf("/")!=-1) {			return surl.substring(0,surl.indexOf("/"))		} else {			return surl;		}	} else {		return "";	}}function doSecureVersion(prm) {	// Moves to https equivalent rather than bounce it	//alert(server);	if (server=='') {		server=getServerName(document.location.href);	}	document.location.href="http://"+server+prm;	}function selectCat(obj,webdbname) {	// Changes the url based on category selection	if (obj!=null) {		var cat=obj.options[obj.selectedIndex].value;		if (cat.toLowerCase()=='browse product categories') {					return;		}		if (cat.indexOf(".") !=-1) {			cat=cat.substring(cat.lastIndexOf(".")+1,cat.length);			doBrowseVersion(webdbname+"/fm_product_list?openform&start=1&count=10&Category="+escape(cat));		} else {			doBrowseVersion(webdbname+"/fm_product_list?openform&start=1&count=10&Category="+escape(cat));				}	}}function doBrowseVersion(prm) {	// Moves to HTTP equivalent rather than bounce it	//alert(server);	if (server=='') {		server=getServerName(document.location.href);	}	document.location.href="http://"+server+prm;	}function empty(unid) {	var inbox=null;	if (document.getElementById) {		inbox=document.getElementById(unid);					}		inbox.value=0;	document._quantities.submit();}function checkCartRedirect(obj) {	var webdbname=obj.value;	// checks to see if cart is empty, if so redirects to error page	ncr=document.all.NoCartRedirect;	//alert(ncr.value);	if (ncr!=null) {		if (ncr.value=='1') {  // @true			document.location.href="/"+webdbname+"/default.html";		}	}}function isInteger(s){   var i;    for (i = 0; i < s.length; i++)    {           // Check that current character is number.        var c = s.charAt(i);        if (((c < "0") || (c > "9"))) return false;    }    // All characters are numbers.    return true;}if (document.images) {	payImg = new Image();  	payImg.src = loc.substring(0,loc.indexOf(".nsf"))+".nsf/ProcessPayment.gif";     	payImg.onLoad=allowPayment();}function allowPayment () {	// unhides the paymeent button	if (document.all.imgsubmit) {		if (document.all.imgsubmit.style.visibility='hidden') {			document.all.imgsubmit.style.visibility='visible';		}	}}function securePage() {	// sets https	//alert(document.location.href);	var loc=document.location.href.toLowerCase();	//	alert(loc);	//if (loc.indexOf("https")==-1) {	//	loc=loc.replace("http:","https:");	//document.location.href=loc;	//}}function unsecurePage() {	// sets http	var loc=document.location.href.toLowerCase();	if (loc.indexOf("https:") != -1) {		loc=loc.replace("https:","http:");		document.location.href=loc;	}}function logout (loc) {	document.location.href="?logout";}	function checkGUID() {	//redirect on guid not being found in cookie	if (document.cookie.indexOf("GUID")==-1) {		// REDIRECT, no GUID		document.location.href="/";	}	}function checkOrderID() {	//redirect on guid not being found in cookie	if (document.cookie.indexOf("ORDERID")==-1) {		// REDIRECT, no ORDER ID on thank you page		document.location.href="/";	}	}function checkLogin (status) {	if (status!=1) {		document.location.href="/";	}}function doOverOut(obj,val,typ) {	/**		Rotates images for out			typ=over or out	**/	var i=obj.src.indexOf("_");	if (i >0) {		obj.src=obj.src.substring(0,i)+"_"+typ+".gif";	} else {		obj.src=val+"_"+typ+".gif";	}}function printPage() {	loc=document.location.href.toLowerCase();	if (loc.indexOf("fm_")!=-1) {		var pos=loc.indexOf("fm_");		var pos2=loc.indexOf("?open");		if (pos2!=-1) {			var ref=loc.substring(pos,pos2);			var newref=ref+"_print";			document.location.href=loc.replace(ref,newref);		}	}	} function changeDetails(obj, unid) {	// Update product details in place	// The separators are in this order:   price###origstockno###category###subcat###subcat2###filename	var idPrefix=new Array(7);	idPrefix[0]="price";	idPrefix[1]="code";	idPrefix[2]="cat";	idPrefix[3]="subcat";	idPrefix[4]="subcat2";	idPrefix[5]="subunid";	idPrefix[6]="filename";	var where='';	window.status=unid;	if (obj!=null) {		aryParts=obj.options[obj.options.selectedIndex].title.split("###");						var subunid="";//we may use this later		for (x=0; x < idPrefix.length; x++) {						if (idPrefix[x]=='subunid') {				subunid=aryParts[x];// that stores it so we can use picture in url			}			var prefix="";				if (idPrefix[x]=='subcat') {					// add "/"					prefix ="/"; 				} else {prefix="";}			if (document.getElementById(idPrefix[x]+unid)) {						if (idPrefix[x]=='filename') {					var src=document.getElementById(idPrefix[x]+unid).src.toLowerCase();					if (src.indexOf("$file")!=-1) {						if (aryParts[x]=='' || aryParts[x]=='undefined') {																document.getElementById(idPrefix[x]+unid).src=src.substring(0,src.indexOf(".nsf"))+".nsf/noimage.gif";						} else {							var pt=aryParts[x];							if (pt.indexOf("sml_")==-1 && (pt.indexOf(".jpg") > 0 || pt.indexOf(".gif") > 0 )) {								aryParts[x]="sml_"+aryParts[x];							}							where='a';							var newPath=src.substring(0,src.indexOf("$file"))+"$file/"+aryParts[x];							newPath=newPath.toLowerCase().replace(unid.toLowerCase(),subunid.toLowerCase());							document.getElementById(idPrefix[x]+unid).src=newPath;						}					} else {						//alert("3. subunid="+subunid+" from parts of "+aryParts.join("###"));						// Fix this bit, because we could have come from noimage.gif and have no unid path						// must use subunid here, even though sometimes it goes missing						if (aryParts[x]=='' || aryParts[x]=='undefined') {									var newPath=src.substring(0,src.indexOf(".nsf"))+".nsf/noimage.gif";												} else {							var newPath=src.substring(0,src.indexOf(".nsf"))+".nsf/0/"+subunid+"/$file/sml_"+aryParts[x];						}						// Addition						if (newPath.toLowerCase().indexOf(unid.toLowerCase()) !=-1) {							newPath=newPath.toLowerCase().replace(unid.toLowerCase(),subunid.toLowerCase());						} else {							newPath=newPath.toLowerCase().replace(subunid.toLowerCase(),unid.toLowerCase());						}						document.getElementById(idPrefix[x]+unid).src=newPath;										} 								} else {					var pt=aryParts[x];					if (pt.indexOf("sml_")==-1 && (pt.indexOf(".jpg") > 0 || pt.indexOf(".gif") > 0 )) {						aryParts[x]="sml_"+aryParts[x];					}																document.getElementById(idPrefix[x]+unid).innerHTML=prefix+aryParts[x];				}							} else {								if (document.all[idPrefix[x]+unid]) {					if (document.all[idPrefix[x]+unid].innerHTML) {							document.all[idPrefix[x]+unid].innerHTML=prefix+aryParts[x];										} else {							if (idPrefix[x]=='filename') {								//alert("Setting 2");									where='a';									var src=document.all[idPrefix[x]+unid].src.toLowerCase();																		if (src.indexOf("$file")!=-1) {									if (aryParts[x]=='' || aryParts[x]=='undefined') {																where='d';											document.all[idPrefix[x]+unid].src=src.substring(0,src.indexOf(".nsf"))+".nsf/noimage.gif";										} else {											var newPath=src.substring(0,src.indexOf("$file"))+"$file/sml_"+aryParts[x].replace(unid,subunid);												// New											if (newPath.toLowerCase().indexOf(unid.toLowerCase()) !=-1) {												newPath=newPath.toLowerCase().replace(unid.toLowerCase(),subunid.toLowerCase());											} else {												newPath=newPath.toLowerCase().replace(subunid.toLowerCase(),unid.toLowerCase());											}											document.all[idPrefix[x]+unid].src=newPath;										}									} else {										if (aryParts[x]=='' || aryParts[x]=='undefined') {											var newPath=src.substring(0,src.indexOf(".nsf"))+".nsf/noimage.gif";										} else {											var newPath=src.substring(0,src.indexOf(".nsf"))+".nsf/0/"+subunid+"/$file/sml_"+aryParts[x];										}										// newpath										newPath=newPath.toLowerCase().replace(unid.toLowerCase(),subunid.toLowerCase());										if (newPath.toLowerCase().indexOf(unid.toLowerCase()) !=-1) {											newPath=newPath.toLowerCase().replace(unid.toLowerCase(),subunid.toLowerCase());										} else {											newPath=newPath.toLowerCase().replace(subunid.toLowerCase(),unid.toLowerCase());										}										document.all[idPrefix[x]+unid].src=newPath;									}							}					}				} 			}		}			} }function displayDetails(ref) {	// Loads details page for given product	var unid=getRealUnid(ref);	// handles sub-products	var loc=document.location.href.toLowerCase();	if (loc.indexOf(".nsf")!=-1) {			document.location.href=loc.substring(0,loc.indexOf(".nsf"))+".nsf/0/"+unid+"?opendocument";	} else {		document.location.href="0/"+unid+"?opendocument"; 	}	}function getRealUnid(ref) {	// Returns a unid depending on whether we have got drop down selection or not	// We are passed the unid of the selector so we can see if there is a drop down or	// not, if not, just return the unid and all should be well	if (document.getElementById) {				var fld=document.getElementById(ref);				if (fld !=null) {			// return unid			return fld.options[fld.selectedIndex].value;			} else {			return ref.replace("sel","");		}	} else {		if (document.all) {			var fld=document.all[ref];			if (fld!=null) {							// returns unid				return fld.options[fld.selectedIndex].value;				} else {				return ref.replace("sel","");			}		} else {			return ref.replace("sel","");		}	}	return ref;}function addToCart(ref) { 		// This will add the currently selected item to the cart and also use the quantity as a key too	// format for quantity option is selqtyUNID	var url="";	var vw=escape(document.location.href);	var loc=document.location.href.toLowerCase();	var selqtyval=0;	if (loc.indexOf(".nsf") >-1) {		url=loc.substring(0,loc.indexOf(".nsf")+4)+"/(cart)?openagent&pID=";	} 	//window.status="Adding to cart.."+ref;	if (document.getElementById) {		var fld=document.getElementById(ref);				if (fld !=null) {			var unid=fld.options[fld.selectedIndex].value;					if (unid.indexOf("|") > 0) {				unid=unid.substring(unid.indexOf("|"),unid.length);			}								var selqty=document.getElementById("selqty"+unid);			if (selqty!=null) {				if (selqty.options) {					selqtyval=selqty.options[selqty.selectedIndex].value;				} else {					selqtyval=selqty.value;				}			} else {				selqtyval=1;			}		} else {			// No sizing, so go with the current item						var unid=ref.replace("sel","");			var selqty=document.getElementById("selqty"+unid);			if (selqty!=null) {					if (selqty.options) {						// Drop down						selqtyval=selqty.options[selqty.selectedIndex].value;					} else {						// Just value						selqtyval=selqty.value;					}			} else {				selqtyval=1;			}		}		if (parseInt(selqtyval)==0) {			alert("Please enter a valid quantity");			return;		} else {						document.location.href=url+unid+"&qty="+selqtyval+"&view="+escape(vw);//window.alert(document.location.href=url+unid+"&qty="+selqtyval+"&view="+escape(vw));		}		}	}  function chkRemind() {	validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;	strEmail = document.all.Email.value;	if (strEmail.search(validRegExp) == -1) 	{		alert(" A valid e-mail address is required.\r\Please check you have entered your details correctly.");		return false;	}  else {		return true;	}	}function validate(){	validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;	strEmail = document.all.Email.value;	if (strEmail.search(validRegExp) == -1) 	{		alert(" A valid e-mail address is required.\r\Please check you have entered your details correctly.\r\r\ \u00A9 Paul Holmes 2001-2003");		return false;	} }function chkDelFrm() { 	document.saddress.submit();}function chkDropLine(frm) {	// Checks droip us a line form	var msg="";		if(validateEmail(frm.cusEmail.value)==false){		msg="\n\nCustomer Email is invalid";		}	if(frm.topic.value==""){		if (msg !="") {			msg=msg+"\nTopic is missing";		} else {			msg="Topic is missing";		}		}		if(frm.summary.value==""){		if (msg !="") {			msg=msg+"\nSummary is missing";		} else {			msg="Summary is missing";		}	 	}		if (msg!="") {		alert("Please fill in all the designated fields correctly."+msg);		return false;	}  else {		return true;	}}function chkSendProblem(frm) {	// Validates Problem form	var msg="";		if(validateEmail(frm.cusEmail.value)==false){		msg="\n\nCustomer Email is invalid";		}	if(frm.topic.value==""){		if (msg !="") {			msg=msg+"\nTopic is missing";		} else {			msg="Topic is missing";		}		}					if (msg!="") {		alert("Please fill in all the designated fields correctly."+msg);		return false;	}  else {		return true;	}}function chkFrm(ty){//ty= type S = SHIPPING, b=biling	varCont = true;	var phone='';		if (ty=='S') {		// Shipping		if(document.saddress.cusSAdd1.value==""){			varCont =  false;		 }		 if(document.saddress.cusSCity.value==""){			varCont =  false;		 }		if(document.saddress.cusSPCode.value==""){			varCont =  false;		 }		if(document.saddress.cusSCountry.selectedIndex==-1){			varCont =  false;		} else {			var country=document.saddress.cusSCountry.options[document.saddress.cusSCountry.selectedIndex].value;					if (country=='' || country=='xx') {						varCont =  false;			}		}		phone=document.saddress.cusSPhone.value;		if(phone==""){			varCont =  false;		}		} else {		// Billing		if(document.baddress.cusFName.value==""){			varCont =  false;		 }		if(document.baddress.cusLName.value==""){			varCont =  false;		 }		if(document.baddress.cusBAdd1.value==""){			varCont =  false;		 }		 if(document.baddress.cusBCity.value==""){			varCont =  false;		 }		if(document.baddress.cusBPCode.value==""){			varCont =  false;		 }		if(document.baddress.cusBCountry.selectedIndex==-1){			varCont =  false;		} else {			var country=document.baddress.cusBCountry.options[document.baddress.cusBCountry.selectedIndex].value;							if (country=='' || country=='xx') {						varCont =  false;			}		}		phone=document.baddress.cusBPhone.value;		if(phone==""){			varCont =  false;		}			if (ty=='BP') {			// do password						pword=document.baddress.cusPWord.value;			if(pword==""){				varCont =  false;			}			// check auf Sonderzeichen			if((document.baddress.cusFName.value.indexOf('\u00E4') !== -1) || (document.baddress.cusFName.value.indexOf('\u00F6') !== -1) || (document.baddress.cusFName.value.indexOf('\u00FC') !== -1) || (document.baddress.cusFName.value.indexOf('\u00E8') !== -1) || (document.baddress.cusFName.value.indexOf('\u00E9') !== -1) || (document.baddress.cusFName.value.indexOf('\u00E0') !== -1) || (document.baddress.cusFName.value.indexOf('\u00F4') !== -1) || (document.baddress.cusFName.value.indexOf('\u00E2') !== -1) || (document.baddress.cusFName.value.indexOf('\u00EA') !== -1)){			alert("Bitte benutzen Sie f\u00FCr den Namen/Vornamen keine Sonderzeichen. Danke.\n\nSvp n'utilisez pas de caract\u00E8res sp\u00E9ciaux pour le nom/pr\u00E9nom. Merci.");			varCont =  false;			}			if((document.baddress.cusLName.value.indexOf('\u00E4') !== -1) || (document.baddress.cusLName.value.indexOf('\u00F6') !== -1) || (document.baddress.cusLName.value.indexOf('\u00FC') !== -1) || (document.baddress.cusLName.value.indexOf('\u00E8') !== -1) || (document.baddress.cusLName.value.indexOf('\u00E9') !== -1) || (document.baddress.cusLName.value.indexOf('\u00E0') !== -1) || (document.baddress.cusLName.value.indexOf('\u00F4') !== -1) || (document.baddress.cusLName.value.indexOf('\u00E2') !== -1) || (document.baddress.cusLName.value.indexOf('\u00EA') !== -1)){			alert("Bitte benutzen Sie f\u00FCr den Namen/Vornamen keine Sonderzeichen. Danke.\n\nSvp n'utilisez pas de caract\u00E8res sp\u00E9ciaux pour le nom/pr\u00E9nom. Merci.");			varCont =  false;			}	var re;         re = /^\w+([\.-]?\w+)*@\w+$/;        if (document.baddress.cusEmail.value == ""){		alert("Bitte \u00FCberpr\u00FCfen Sie die Eingabe Ihrer Email-Adresse.\n\nAssurez-vous que votre adresse e-mail est compl\u00E8te et correcte.");		varCont =  false;	}		}	}	if(varCont == false){		alert("Es sind noch nicht alle Felder ausgef\u00FCllt...\n\nAssurez-vous que vous avez bien compl\u00E9t\u00E9 tous les champs obligatoires.")	}	else{		// Check validity first		if (checkInternationalPhone(phone)==false){			alert("Bitte \u00FCberpr\u00FCfen Sie die korrekte Eingabe der Telefon-Nr.\n\nAssurez-vous que vous avez bien compl\u00E9t\u00E9 le champs T\u00E9l\u00E9phone.");					return;		} else {			if (ty=='S') {				document.saddress.submit()			} else {				// One more sanity check - make sure we don't use an existing username/ password				// there are three hidden fields oldfname, oldsname and lkupnames				// if the new firstname and lastname are not in lkupnames then OK				// if the new firstname and lastname are equal to the old firstname lastname then ok				var aryNames=document.baddress.lkupnames.value.split(",");											var blFlag=false;				for (var i=0; i < aryNames.length; i++) {					var fullname=document.baddress.cusFName.value.trim()+" "+document.baddress.cusLName.value.trim();					fullname=fullname.toLowerCase().trim();					if (aryNames[i].toLowerCase().trim()==fullname) {																blFlag=true;					}				}								if (blFlag==false) {					document.baddress.submit();					return;				} else {					// Found match so make sure that this is the old name pairing					// oldfname, oldsname					var oldfname=document.baddress.oldfname.value.toLowerCase();					var oldsname=document.baddress.oldsname.value.toLowerCase();					if (oldfname==document.baddress.cusFName.value.toLowerCase() && oldsname==document.baddress.cusLName.value.toLowerCase()) {						document.baddress.submit();						return;					} else {						alert("Bitte benutzen Sie eine andere Email-Adresse - diese ist bereits in Gebrauch.\n\nSVP utilisez une autre adresse e-mail - ceci est d\u00E9j\u00E0 utilis\u00E9.");						return;						}				}			}		}	}}function numbersonly(myfield, e, dec){var key;var keychar;if (window.event)   key = window.event.keyCode;else if (e)   key = e.which;else   return true;keychar = String.fromCharCode(key);// control keysif ((key==null) || (key==0) || (key==8) ||     (key==9) || (key==13) || (key==27) || (key==32) )   return true;// numberselse if ((("0123456789").indexOf(keychar) > -1))   return true;// decimal point jumpelse if (dec && (keychar == "."))   {   myfield.form.elements[dec].focus();   return false;   }else   return false;}function doFuzzy() {	var newloc="";	newloc=document.location.href.toLowerCase().replace("searchfuzzy=false","searchfuzzy=true");	document.location.href=newloc.replace("&query=","&Query=");}function createCookie(name,value,days){	if (days)	{		var date = new Date();		date.setTime(date.getTime()+(days*24*60*60*1000));		var expires = "; expires="+date.toGMTString();	}	else var expires = "";	document.cookie = name+"="+value+expires+"; path=/";}function readCookie(name){	var nameEQ = name + "=";	var ca = document.cookie.split(';');	for(var i=0;i < ca.length;i++)	{		var c = ca[i];		while (c.charAt(0)==' ') c = c.substring(1,c.length);		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);	}	return null;}function eraseCookie(name){	createCookie(name,"",-1);}function returning(){	var chked=document.all.rememberMe.checked;	 	//alert(rm.options[rm.selectedIndex].value);	if ((document.login.Username.value=="") || (document.login.Password.value=="")){		alert("Please ensure that you enter both your email address and password");		}else{		if (chked==true) {			createCookie('spsusername',document.login.Username.value,7);		}		document.login.submit();	}	}function newuser(){	var chked=document.all.rememberMe.checked;	if (document.newuser.EMailNew.value==""){		alert("Please ensure that you enter your email address");	} else{		if (validateEmail(document.newuser.EMailNew.value)==false) {			alert("Please supply a valid email address.");			return;		}		if (document.newuser.NewPassword1.value=="" || document.newuser.NewPassword2.value=="") {			alert("Please ensure that you supply valid, matching passwords");		} else {			if (document.newuser.NewPassword1.value != document.newuser.NewPassword2.value) {				alert("Please ensure that you supply valid, matching passwords");			} else {//				if (chked==true) {//					createCookie('spsusername',document.newuser.EMailNew.value,7);//				}				document.newuser.submit();			}		}	}}function validateEmail( strValue) {/************************************************DESCRIPTION: Validates that a string contains a  valid email pattern. PARAMETERS:   strValue - String to be tested for validityRETURNS:   True if valid, otherwise false.REMARKS: Accounts for email with country appended  does not validate that email contains valid URL  type (.com, .gov, etc.) or valid country suffix.*************************************************/var objRegExp  = /(^[a-z]([a-z_\.]*)@([a-z_\.]*)([.][a-z]{3})$)|(^[a-z]([a-z_\.]*)@([a-z_\.]*)  (\.[a-z]{3})(\.[a-z]{2})*$)/i;//var objRegExp = /^\w+([\.-]?\w+)*@\w+$/;if(strValue!=="") {return true;}}function redirect(obj) {	var index=obj.selectedIndex;		var loc=document.location.href.toLowerCase();	// o = development, 1 = secure	switch (index) {		case 1:			document.location.href=repServer(loc,index);			break;		case 2:			document.location.href=repServer(loc,index);			break;		default:			break;	}}function repServer(loc, index) {	switch (index) {		case 1://			alert(loc.replace("https://secure1.salvationarmy.org","http://saihqd.salvationarmy.org"));			return loc.replace("https://secure1.salvationarmy.org","http://saihqd.salvationarmy.org");			break;		case 2://			alert(loc.replace("http://saihqd.salvationarmy.org","https://secure1.salvationarmy.org"));			return loc.replace("http://saihqd.salvationarmy.org","https://secure1.salvationarmy.org");			break;	}}//Set up this variable so that the form can only be submitted oncevar submitted = false;function chkPMFrm(){//New MHA				document.forms[0].submit();				submitted=true;	var str = document.payment.ccNum.value;	var loc=document.location.href;	var path='';	loc=loc.toLowerCase();	if (loc.indexOf(".nsf") !=-1) {		path=loc.substring(0,loc.indexOf(".nsf"))+".nsf/";	}	if(submitted==false){			//lets check to ensure it contains only numerical characters			var regExp = /[0-9 ]+/gi;			var str1 = str.match(regExp);		if (str1 == null){				alert("Please ensure you enter a valid credit card number");			}			else{				if (document.payment.imgsubmit) {										//document.payment.imgsubmit.src=path+"processpayment.gif";										document.payment.imgsubmit.src=payImg.src;				} else {					if (document.all) {						//document.all.imgsubmit.src=path+"processpayment.gif";								document.all.imgsubmit.src=payImg.src;					} else {						if (document.forms[2]) {						//	document.forms[2].imgsubmit.src=path+"processpayment.gif";								document.forms[2].imgsubmit.src=payImg.src;										}					}				}								document.payment.submit();				submitted=true;			}		}	}function popUp(type,key) {if (type == "VeriSign") {url = "https://servicecenter.verisign.com/cgi-bin/Xquery.exe?Template=authCertByIssuer&remote_host=https://digitalid.trustwise.com/globalServer/cgi-bin/haydn.exe&form_file=../fdf/authCertByIssuer.fdf&issuerSerial=" + key;sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0, status=1,menubar=1,scrollbars=1,resizable=1,WIDTH=500,height=450');self.name = "mainWin"}else {tmpWindow = fullURL + '/' + type;contactUsWindow = window.open(tmpWindow , 'salarmydonation' , 'status=0,toolbar=0,menubar=0,scrollbars=1,width=300,height=300' ) ;}}function stripCharsInBag(s, bag){   var i;    var returnString = "";    // Search through string's characters one by one.    // If character is not in bag, append to returnString.    for (i = 0; i < s.length; i++)    {           // Check that current character isn't whitespace.        var c = s.charAt(i);        if (bag.indexOf(c) == -1) returnString += c;    }    return returnString;}function checkInternationalPhone(strPhone){	s=stripCharsInBag(strPhone,validWorldPhoneChars);	return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);}function delete_cookie ( cookie_name ){	alert("deleting");  var cookie_date = new Date ( );  // current date & time  cookie_date.setTime ( cookie_date.getTime() - 1 );  document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();}