function goInit(){if(!document.getElementsByTagName)return;var a=document.getElementsByTagName("a");for(var b=0;b<a.length;b++){var c=a[b];if(c.getAttribute("href")&&c.getAttribute("rel")=="external")c.target="_blank"} }
function mailLink(mea) {
var full1 = mea + '@' + 'planability' + '.' + 'co.uk';
document.write ('<a href="' + 'mail' + 'to:' + full1 + '?subject=Website%20Enquiry" title="Click To Send Email">' + full1 + '</a>')
}
function goContent() {
var coni = document.getElementById("main_page_content_image");
var conh = document.getElementById("main_page_content_content").offsetHeight;
if (conh > 350) { coni.style.paddingTop = (conh-350) + "px"; }
}
function formCheck(formobj){
var formid = formobj.elements["idform"].value;
var fieldRequired = formobj.elements[formid + "_req1"].value.split(",");
var fieldDescription = formobj.elements[formid + "_req2"].value.split(",");
var dobord = formobj.elements["doborder"].value;
// dialog message
var alertMsg = "Please complete the following fields:\n";
	
var l_Msg = alertMsg.length;
	
for (var i = 0; i < fieldRequired.length; i++){
	var obj = formobj.elements[fieldRequired[i]];
	if (obj){
	switch(obj.type){
	case "select-one":
	if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
	alertMsg += " - " + fieldDescription[i] + "\n";
	}
	break;
	case "select-multiple":
	if (obj.selectedIndex == -1){
	alertMsg += " - " + fieldDescription[i] + "\n";
	}
	break;
	case "text":
	case "textarea":
	if (obj.value == "" || obj.value == null){
	if (dobord == "1") { obj.style.border="1px solid #FF0000"; }
	obj.style.backgroundColor="#FFBDBD";
	alertMsg += " - " + fieldDescription[i] + "\n";
	} else {
	if (dobord == "1") { obj.style.border="1px solid #000000"; }
	obj.style.backgroundColor="#FFFFFF";
	}
	break;
	default:
	}
	if (obj.type == undefined){
	var blnchecked = false;
	for (var j = 0; j < obj.length; j++){
	if (obj[j].checked){
	blnchecked = true;
	}
	}
	if (!blnchecked){
	alertMsg += " - " + fieldDescription[i] + "\n";
	}
	}
	}
	}

	if (alertMsg.length == l_Msg){
	return true;
	}else{
	alert(alertMsg);
	return false;
	}
}
function fullImage(imid) {
var url = "http://www.planability.co.uk/fullimage/" + imid + "/";
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
function subAlert(a){
	switch(a){
		case 1:emsg="ERROR: That email address is already subscribed.";
		break;
		case 2:emsg="ERROR: The email address you entered is invalid.\nPlease Check It And Try Again.";
		break;
		case 3:emsg="Thankyou. We have sent a confirmation email to\nthe address you provided. \n Please click the link in the email \n to confirm subscription to the Planability Newsletter.";
		break
		}
		alert(emsg)}