// JavaScript Document
var timerid
preloadimages();

function init() {

return true;
}

function preloadimages() {

	var images = new Array("logoback.jpg","giveusacall.gif","requestcallback.gif","rightslant.gif","leftslant.gif","blank.gif","line.gif","righ1.jpg","right2.jpg","right3.jpg");
	
	var img = new Array();
	for (i=0; i<images.length; i++) {
		img[i] = new Image;
		img[i].src = relpath+"pics/"+images[i];
	}
	
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function openImage(str_URL, str_title, int_width, int_height, str_resize, str_scroll, str_autoSize) {
	if (int_width == 0) {
		int_width = 600
	} if (int_height == 0) {
		int_height = 400
	} if (str_resize != 'yes') {
		str_resize = 'no'
	} if (str_scroll != 'yes') {
		str_scroll = 'no'
	}
	
	newWindow = window.open('', '_blank', 'width='+int_width+',height='+int_height+',menubar=off,directories=off,toolbar=off,resizable='+str_resize+',scrollbars='+str_scroll);
	newWindow.document.write("<html>")
	newWindow.document.write("<title>" + str_title + "</title>")
	
	if (str_autoSize = 'yes') {
		newWindow.document.write("<body onload=\"window.resizeTo(document.getElementById('myImage').width+20, document.getElementById('myImage').height+70)\">")
	} else {
		newWindow.document.write("<body>")
	}
	
	newWindow.document.write("<img src='" + str_URL + "' alt='" + str_title + "' id='myImage' />")
	newWindow.document.write("</body>")
	newWindow.document.write("</html>")
	newWindow.document.close()
	if (window.focus) {newWindow.focus()};
	
}




function defaultFocus(oEle, sValue){
	if(oEle.value == sValue){
		oEle.value = '';
	}
}

function defaultBlur(oEle, sValue){
	if(oEle.value == ''){
		oEle.value = sValue;
	}
}

function verifyCallUs() {
	if (document.CallBack.enquiry.value == '' || document.CallBack.enquiry.value == 'enquiry') {
		alert('Please enter your enquiry');
		document.CallBack.enquiry.focus();
	} else if (document.CallBack.name.value == '' || document.CallBack.name.value == 'your name') {
		alert('Please enter your name');
		document.CallBack.name.focus();
	} else if (((document.CallBack.email.value == '') || (document.CallBack.email.value == 'email address')) && ((document.CallBack.telephone.value == '') || (document.CallBack.telephone.value == 'telephone'))) {
		alert('Please enter your email address or telephone number');
		document.CallBack.email.focus();
	} else if (document.CallBack.h_formValidation.value != 'true') { 
		alert("To prevent Spam submissions, please manually enter your name to proceed.")
		document.CallBack.name.focus();
	}  else  {
		document.CallBack.action = "http://secure3.spiderscope.co.uk/vs/1688/scripts/sendmail_2005.asp"
		document.CallBack.submit();
	}
}

function justverify () {
	document.CallBack.h_formValidation.value = 'true'	
}

function verifyContact() {
	if (document.ContactForm.name.value == '') {
		alert('Please enter your name');
		document.ContactForm.name.focus();
	} else if ((document.ContactForm.email.value == '') && (document.ContactForm.phone.value == '')) {
		alert('Please enter your email address or telephone number');
		document.ContactForm.email.focus();
	} else if (document.ContactForm.enquiry.value == '') {
		alert('Please enter your enquiry');
		document.ContactForm.enquiry.focus();
	} else if (document.ContactForm.h_formValidation.value != 'true') { 
		alert("To prevent Spam submissions, please manually enter your name to proceed.")
		document.ContactForm.name.focus();
	}  else  {
		document.ContactForm.action = "http://secure3.spiderscope.co.uk/vs/1688/scripts/sendmail_2005.asp"
		document.ContactForm.submit();
	}
}

function justverify2 () {
	document.ContactForm.h_formValidation.value = 'true'	
}