function primaryClick(objTD, blnNewWindow) {

	if (blnNewWindow == true) {
		window.open(objTD.children[0].href, "newWindow");
	} else {
		window.location = objTD.children[0].href;
	}

}


function intertrav() {
	try{
		parent.frames[0].document.userData.user_id.value;
		alert('You are already logged in');
	}
	catch(e){
  		var url = 'https://www.intertrav.co.uk/admin/index.html';
  		w = screen.availWidth-10;
  		h = screen.availHeight-50;
  		features = "width="+w+",height="+h;
  		features += ",left=0,top=0,scrollbars=1,resizable=1,status=0";

  		window.open(url, "", features);
	}
}

function showMenu(menu){
 document.getElementById(menu).style.visibility = "visible";
 }
 function hideMenu(menu){
 document.getElementById(menu).style.visibility = "hidden";
 }
 
 
 // Function to change any text to Proper Case (e.g. picco -> Picco)
String.prototype.toProperCase = function() 
{
    var out = "";
	var parts = this.split(" ");
	for(var i = 0; i < parts.length ; i++){
		var part = parts[i];
		if(i != 0){
			out +=" ";
		}
		out += part.charAt(0).toUpperCase() + part.substring(1,part.length).toLowerCase();
	}
	
	//return this.charAt(0).toUpperCase() + this.substring(1,this.length).toLowerCase();
	return out;
}