/**
 * Preload the images so they are cached.
 * We use this to preload the hover state of top navigation, 
 * so the images don't flicker on first mouse over.
 * @method preload
 * @param domId: the DOM id of the image
 * @param url: the URL to the image
 */
function preload(domId,url) {
	window[domId] = new Image();
	window[domId].src = url;
}

/**
 * Opens a pop up window
 * @method openWindow
 * @param o: the targeted HTML Element
 */
function openWindow(o){
    var u = o.href;
	var w = '450'; //the width of the popup window
	var h = '490'; //the height of the popup window
    var n = 'casestudy'; //the window object name
	var k = 2; //the key encode of the popup window features
	var a=[],o=null,r=arguments;
	a[0]="width="+w+",height="+h;
	a[1]=",scrollbars="+((k&1)?1:0);
	a[2]=",resizable="+((k&2)?1:0);
	a[3]=",toolbar="+((k&4)?1:0);
	a[4]=",status="+((k&8)?1:0);
	a[5]=",location="+((k&16)?1:0);
	a[6]=",menubar="+((k&32)?1:0);
	if(r.length>=6){a[7]=(document.layers)?",screenX="+r[5]:",left="+r[5]}
	if(r.length>=7){a[8]=(document.layers)?",screenY="+r[6]:",top="+r[6]}
	a=a.join("");
	o=open(u,n,a);
	o.focus();
	return o;
}


