/** GENERAL FUNCTIONS* * Window and screen handling functions**//**************************************** Window and screen handling functions ***************************************************///page global variablesvar window_width, window_height, screen_width, screen_height, avail_width, avail_height;var pop_win_ref;//function to get page dimensionsfunction getPageDimensions() {	window_width = (is_ie) ? document.body.clientWidth : window.innerWidth;	window_height = (is_ie) ? document.body.clientHeight : window.innerHeight;		avail_width = screen.availWidth;	avail_height = screen.availHeight;		screen_width = screen.width;	screen_height = screen.height;}//function get xy (returns string for pop up propertiesfunction getWinXY (win_width,win_height) {			//get page dimensions if not already set	if (screen_width == null) getPageDimensions();		//determine x y of centered window	var xpos = Math.round(((avail_width - win_width)/2));	var ypos = Math.round(((avail_height - win_height)/2)) - ((screen_height - avail_height)/2);			win_width = (is_ie && is_mac) ? (win_width - 20) : win_width;		//start return string	var return_string = 'width='+win_width+',height=' + win_height;		//return relevant string	if (is_nav && (is_major <=4)) return (return_string + ',screenX=' + xpos + ',screenY=' + ypos)	else return (return_string + ',left=' + xpos + ',top=' + ypos)}//futura general popup function (centres on page)function popWin (file_name,win_name,win_width,win_height,is_scroll,is_resize,config) {	//create conf_string for popup	var conf_string = getWinXY(win_width,win_height);	if (is_scroll == 'auto') conf_string += ',scrollbars=auto'	else conf_string += (is_scroll) ? ',scrollbars=yes' : ',scrollbars=no';	conf_string += (is_resize) ? ',resizable=yes' : ',resizable=no';	if (config != null) conf_string += config;	//window.alert(conf_string);	//open window and set to focus	//if (pop_win_ref && (!pop_win_ref.closed)) pop_win_ref.close();	pop_win_ref = window.open(file_name,win_name,conf_string);	window.setTimeout('window.pop_win_ref.focus()', 1000);}function resizeWin(file_name,obj_win,new_width,new_height){	//set resize offsets (window appears smaller when resized compared to pop up)	var width_offset = (is_ie) ? 10 : 5;	var height_offset = 60;		//add offsets to new width and heights	new_width += width_offset;	new_height += height_offset;	//window.alert(new_width + ' - ' + new_height);		//get page dimensions if not already set	if (screen_width == null) getPageDimensions();		//determine x y of centered window based on new width and heights	var xpos = Math.round(((avail_width - new_width)/2));	var ypos = Math.round(((avail_height - new_height)/2));		//window.alert('resize window');	obj_win.blur();	obj_win.moveTo(xpos,ypos);	obj_win.resizeTo(new_width,new_height);	obj_win.document.location.replace(file_name);	obj_win.focus();}//function to make embed tagfunction makeFlashEmbed(clipRef, clipSrc, clipWidth, clipHeight, bgColour){	var d = document;	d.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ');	d.writeln('		codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ');	d.writeln('		width="' + clipWidth + '" ');	d.writeln('		height="' + clipHeight + '" ');	d.writeln('		id="' + clipRef + '" ');	d.writeln('	<param name="allowScriptAccess" value="sameDomain" />');	d.writeln('	<param name="movie" value="' + clipSrc + '" />');	d.writeln('	<param name="quality" value="high" />');	d.writeln('	<param name="bgcolor" value="' + bgColour +'" />');	d.writeln('	<param name="wmode" VALUE="transparent" />');	d.writeln('	<param name="LOOP" value="false">');	d.writeln('	<embed  src="' + clipSrc + '" ');	d.writeln('			quality="high" ');	d.writeln('			bgcolor="' + bgColour +'" ');	d.writeln('			width="' + clipWidth + '" ');	d.writeln('			height="' + clipHeight + '" ');	d.writeln('			name="' + clipRef + '" ');	d.writeln('			loop="false"');	d.writeln('			wmode="transparent"');	d.writeln('			allowScriptAccess="sameDomain" ');	d.writeln('			type="application/x-shockwave-flash" />');	d.writeln('</object>');};