// Open links outside
function externalLinks() {  
	if (!document.getElementsByTagName) return;  
	var anchors = document.getElementsByTagName("a");  
	for (var i=0; i<anchors.length; i++) {  
		var anchor = anchors[i];  
		if (anchor.getAttribute("href") &&  
			anchor.getAttribute("rel") == "external")  
		 anchor.target = "_blank";  
	}  
}  
window.onload = externalLinks;

// Contact form
function checkcontactform ( form )
{
	if (form.area.value == "0") {
		alert( "Please select a query from the dropdown box." );
		form.area.focus();
		return false ;
	}
	if (form.name.value == "Your Name" || form.name.value == "") {
		alert( "Please enter your name." );
		form.name.focus();
		return false ;
	}
	if (form.email.value == "Your Email Address" || form.email.value == "") {
		alert( "Please enter your email address." );
		form.email.focus();
		return false ;
	}
	if (form.comments.value == "Your Comments..." || form.comments.value == "") {
		alert( "Please enter any comments or questions you wish to ask." );
		form.comments.focus();
		return false ;
	}
	if (form.captcha_code.value == "") {
		alert( "Please enter the CAPTCHA image verification code." );
		form.captcha_code.focus();
		return false ;
	}
	return true ;
}

// Laptop repair form
function checkrepairform ( form )
{
	if (form.name.value == "Name" || form.name.value == "") {
		alert( "Please enter your name." );
		form.name.focus();
		return false ;
	}
	if (form.email.value == "Email address" || form.email.value == "") {
		alert( "Please enter your email address." );
		form.email.focus();
		return false ;
	}
	if (form.laptop.value == "Laptop make & model" || form.laptop.value == "") {
		alert( "Please enter your laptop make & model." );
		form.laptop.focus();
		return false ;
	}
	if (form.information.value == "Additional information" || form.information.value == "") {
		alert( "Please enter any additional information about your laptop problem." );
		form.information.focus();
		return false ;
	}
	if (form.captcha_code.value == "") {
		alert( "Please enter the CAPTCHA image verification code." );
		form.captcha_code.focus();
		return false ;
	}
	return true ;
}