function returnObjById( id ) 
{ 
    if (document.getElementById) 
        var returnVar = document.getElementById(id); 
	else if (document.all) 
        var returnVar = document.all[id]; 
    else if (document.layers) 
        var returnVar = document.layers[id]; 
    return returnVar; 
} 

function showHideSelection() 
{ 

if (document.theform.ctitle.value=="Other") 
{ 
returnObjById('divctitle').style.display = "none"; 
returnObjById('divothp').style.display = "block";
} 
else 
{ 
returnObjById('divctitle').style.display = "block"; 
returnObjById('divothp').style.display = "none";
} 
}
	function CheckClick ( box ) {

		boxy = document.getElementById(box);

		boxy.checked = !boxy.checked;
		return true;
	}

		function pop(name)
		{
			window.open(name,"jtpopup","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=500");
		}
		
         function ProcessTheForm() {
            errstr = "";
			 errstr2 = "";
           
            
            
			
			if (document.theform.surname.value == "") {
               errstr = errstr + "\nYour Surname";
            }
			
			if (document.theform.email.value == "") {
               errstr = errstr + "\nYour E-mail address";
            }
			
			if (document.theform.address.value == "") {
               errstr = errstr + "\nYour Address";
            }		
			
			if (document.theform.postcode.value == "") {
               errstr = errstr + "\nYour Postcode";
            }	
			
		
			if (document.theform.telephone.value == "" & document.theform.mobile.value == "") {
               errstr = errstr + "\nYour Telephone Number";
            }
			
			
			if ((document.theform.text_message.checked != "" | document.theform.picture_message.checked != "")& document.theform.mobile.value=="") {
               errstr = errstr + "\n Your Mobile Phone Number";
            }
							

						           
            if (errstr != "") {
               alert("Please complete the following fields:"+errstr);
               return false;
			   } else 
			   
			   if (errstr2 != "") {
               alert(errstr2);
               return false;
			   } else 
			   
			   
			   {
               document.theform.submit();
               return true;
            }
         }		
