<!--
function adminGalleryImage(strDir,strcropPage){window.open('../jcrop/upload.asp?start='+strDir+'&cropPage='+strcropPage+'', 'CMS', config='height=750,width=850,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no,screeny=100,screenx=100,left=200,top=200');
 }
function adminUploadImage(strDir,iWidth,iHeight,fname,iFormat){window.open('../jcrop/uploadSingleImage.asp?start='+strDir+'&cropHeight='+iHeight+'&cropWidth='+iWidth+'&fieldname='+fname+'&format='+iFormat+'', 'CMS', config='height=200,width=600,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no,screeny=100,screenx=100,left=200,top=200');
 }

	function launchBox(intBox) 
	{
		if (intBox==1)	{
		 GB_showCenter('Terms','/content/terms.asp', 636, 360);
		}
		if (intBox==2)	{
		 GB_showCenter('Privacy','/content/privacy.asp', 636, 360);
		}
		if (intBox==3)	{
		 GB_showCenter('Disclaimer','/content/disclaimer.asp', 636, 360);
		}
	}

	function launchGamex() 
	{
		 GB_showCenter('','http://www.spur.co.za/games/burger_quest.html', 692, 679);
	}

function launchMap(storeID){
	window.open('/maps/?store='+storeID+'', 'SPURMAP', config='height=600,width=600,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,directories=no,status=no,screeny=100,screenx=100,left=200,top=200');
 }

function launchGame(){window.open('http://www.spur.co.za/games/burger_quest.html', 'SPUR', config='height=692,width=679,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no,screeny=100,screenx=100,left=200,top=200');
 }

function launchWell(){window.open('http://www.spur.co.za/games/well_solution.html', 'SPUR', config='height=650,width=750,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,directories=no,status=no,screeny=100,screenx=100,left=200,top=200');
 }

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function launchTemplate(tID){thewindow = window.open('/templatePreview.asp?ref='+tID+'', 'OPENW', config='height=500,width=700,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no,screeny=100,screenx=100,left=200,top=200');
 }
 
 function containsChars(xvar)
	{
		for (k=0;k<xvar.length;k++)
			{
				if(isNaN(xvar.charAt(k))) return true;
			}
		return false;			
	}
	
	function isWhitespace (s)
		{   
			var i;
			// whitespace characters
			var whitespace = " \t\n\r";

		    // Is s empty?
		    if (isEmpty(s)) return true;

		    // Search through string's characters one by one
			// until we find a non-whitespace character.
		    // When we do, return false; if we don't, return true.

		    for (i = 0; i < s.length; i++)
			    {   
			        // Check that current character isn't whitespace.
			        var c = s.charAt(i);

			        if (whitespace.indexOf(c) == -1) return false;
			    }

		    // All characters are whitespace.
		    return true;
		}		
		
	function isEmpty(s)
		{   
			return ((s == null) || (s.length == 0));
		}		
	
								
function valEmail(el) {
	var invalidChars = " /:,;";
 	if (el.value == "") {
   		alert("Please enter your email address.");
		el.focus();
		return (true);
	}
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i);
    	if (el.value.indexOf(badChar,0) != -1) {
		   	alert("Your email address contains an invalid character, please correct it.");
			el.focus();
			return (true);
	    }
	}
	atPos = el.value.indexOf("@",1);
	if (atPos == -1) {
	   	alert("Your email address must contain an @ character.");
		el.focus();
		return (true);
	}
	if (el.value.indexOf("@",atPos+1) != -1) {
	   	alert("Your email address must have letters before the @ character.");
		el.focus();
		return (true);
	}
	periodPos = el.value.indexOf(".",atPos);
	if (periodPos == -1) {
	   	alert("Your email address must contain a . character.");
		el.focus();
		return (true);
	}
	if (periodPos+3 > el.value.length) {
	   	alert("Your email address must have letters after the . character.");
		el.focus();
		return (true);
	}
	return (false);
}

 
//-->