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(){
	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);
};




////////////////////
// Auto Caption Images with Transparent Background
////////////////////


function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function insertAfter(newElement,targetElement) {
  var parent = targetElement.parentNode;
  if (parent.lastChild == targetElement) {
    parent.appendChild(newElement);
  } else {
    parent.insertBefore(newElement,targetElement.nextSibling);
  }
}

function captionizeImages() {
  if (!document.getElementsByTagName) return false;
  if (!document.createElement) return false;
  var images = document.getElementsByTagName("img");
  if (images.length < 1) return false; 
  for (var i=0; i<images.length; i++) {
    if (images[i].className.indexOf("floatright") != -1) {
      var title = images[i].getAttribute("title");
      var divCaption = document.createElement("div");
      divCaption.className="caption";
      var divCaption_text = document.createTextNode(title);
      divCaption.appendChild(divCaption_text);
      var divContainer = document.createElement("div");
      divContainer.className="imgcontainer";
      images[i].parentNode.insertBefore(divContainer,images[i]);
      divContainer.appendChild(images[i]);
      insertAfter(divCaption,images[i]);
    }
  }
}
addLoadEvent(captionizeImages);









