
function pop(n){
wH=546;wW=440;
if(n==8){wH=520;wW=580;}
tar='caricature_big_'+n+'.htm';
sz="height="+wH+",width="+wW+",resizable";
if(typeof(oW)=="undefined"||oW.closed==true){oW=window.open('','op',sz);}
else{oW.close();oW=window.open('','op',sz);}
oW.location.href=tar;oW.focus();
}

function val(){
	if(document.getElementsByTagName){
	  fields = document.getElementsByTagName('input');
	  for(i=0;i<fields.length;i++){
	  	if(fields[i].getAttribute("type")=="text"){
	  		if(fields[i].name=="field_eadd"){
	  		 e=fields[i].value.match(/[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+/gi);
	  		 if(!e || fields[i].value.indexOf('@')!=fields[i].value.lastIndexOf('@')){
		  		alert("Please enter a valid email address");
	  			fields[i].focus();
	  			return false;  		 	
	  		 }
	  		}
	  		else if(fields[i].value=="" && (fields[i].name=="field_name" || fields[i].name=="field_eadd")){
	  			alert("You missed some required info!");
	  			fields[i].focus();
	  			return false;
	  		}
	  	}
	  }
	}
	bd=new Array(/\%/g, /\;/g, /\$/g, /\+/g);gd=new Array("PERCENT","SEMI-COLON","USD","PLUS");
	for (k=0; k<document.f1.elements.length; k++){
	  for (k2=0; k2<bd.length; k2++){
		document.f1.elements[k].value=document.f1.elements[k].value.replace(bd[k2],gd[k2]);
	  }
	}	
	return true;
}



function proc(){

	document.getElementById('statout').innerHTML='';
	document.getElementById('statout').style.display='none';

	var wid=0;

	if(document.all){
		wid=document.body.offsetWidth;
	}
	else{
		wid=window.innerWidth;
	}

		
	if(wid>920 && document.getElementById){
		
		var lftpos=Math.floor(((wid-560)/2)+580);
		document.getElementById('statout').style.display='block';
		document.getElementById('statout').innerHTML='<div id="stat" style="position:absolute;top:220px;left:'+lftpos+'px;width:150px;min-height:170px;border:1px solid #cccccc;background-color:#F0F0F0;"><p><strong class="os">Orders status ::</strong><br /><br />Currently processing orders from:<br /><strong class="dt">&nbsp;Fri 30th Jul 2010&nbsp;</strong><br /><br />Current time between order and finished card:<br /><strong class="dt">&nbsp;7-8 days&nbsp;</strong><br /><br />Need it quicker? Just ask!</p></div>';
	
	}

}