﻿
function popMap(id){
	xWindow.openCenterScroll("recruiter.aspx?id="+id,"recpop",391,500);
	return false;
}



function showcontent(strFunc){
	
	var pass = document.getElementById("passtxt").value;
    if (((Cookies["langcookie"] != "loggedin") && (pass == "lang2006")) || (Cookies["langcookie"] == "loggedin")){
		var ceform = document.getElementById("passform");
		ceform.style.display = "none";
		
		var cedetails = document.getElementById("hidecontent");
		cedetails.style.display = "block";
		
		doSet();
	}else{
		alert("Incorrect password.");	
	}
	
	return false;
}


function doSet(){
	Cookies.create("langcookie","loggedin",7);	
}

function doGet(){
	alert(Cookies["langcookie"]);
}

function doDel(){
	Cookies.erase("langcookie");
	alert("You have been logged out.");
	window.location.href = window.location;
}

function doInit(){
doSet();
showcontent();
	if(Cookies["langcookie"] == "loggedin"){
		showcontent();
	}
}



////////////////////
// xscreen
////////////////////
if(typeof(xScreen) == "undefined") xScreen = {};

xScreen.getWidth = function(){
	return window.screen ? window.screen.availWidth : 0;
};
xScreen.getHeight = function(){
	return window.screen ? window.screen.availHeight : 0;
};



////////////////////
// xwindowopen
////////////////////
// Requires: xscreen.js
if(typeof(xScreen) == "undefined") alert("xScreen Required");

// ||||||||||||||||||||||||||||||||||||||||||||||||||

if(typeof(xWindow) == "undefined") xWindow = {};

xWindow.open = function(url,name,width,height,xpos,ypos,chrome,scroll,fullscreen){
	var x, y, w, h, moveX=0, moveY=0, features="";
	chrome = chrome ? "yes" : "no";
	scroll = scroll ? "yes" : "no";
	features += "toolbar="+chrome;
	features += ",menubar="+chrome;
	features += ",location="+chrome;
	features += ",status="+chrome;
	features += ",scrollbars="+scroll;
	features += ",resizable="+scroll;
	if(width) features += ",width="+width;
	if(height) features += ",height="+height;
	if(fullscreen) features += ",fullscreen=yes";
	if(xpos){
		w = xScreen.getWidth();
		width = parseInt(width);
		switch(xpos){
			case "left": x = 0; break;
			case "center": x = Math.round((w-width)/2); break;
			case "right": x = w-width; break;
			default: x = xpos;
		}
		features += ",screenX="+x+",left="+x;
		var moveX = x;
	}
	if(ypos){
		h = xScreen.getHeight();
		height = parseInt(height);
		switch(ypos){
			case "top": y = 0; break;
			case "middle": y = Math.round((h-height)/2); break;
			case "bottom": y = h-height; break;
			default: y = ypos;
		}
		features += ",screenY="+y+",top="+y;
		var moveY = y;
	}
	xWindowOpenReference = window.open(url,name,features);
	if(moveX || moveY){
		if(xWindowOpenReference != null && !xWindowOpenReference.closed){
			// position the window for browsers that don't recognize screenX, screenY
			xWindowOpenReference.moveTo(moveX,moveY);
		}
	}
};
xWindow.openScroll = function(url,name,width,height){
	this.open(url,name,width,height,false,false,false,"scroll");
};
xWindow.openCenter = function(url,name,width,height){
	this.open(url,name,width,height,"center","middle");
};
xWindow.openCenterScroll = function(url,name,width,height){
	this.open(url,name,width,height,"center","middle",false,"scroll");
};
xWindow.openFull = function(url,name){
	this.open(url,name,xScreen.getWidth(),xScreen.getHeight(),"0","0",false,false);
};
xWindow.openKiosk = function(url,name){
	this.open(url,name,xScreen.getWidth(),xScreen.getHeight(),"0","0",false,false,true);
};





