<!--

//opens a new popup window containing the page from parameter "url":
var newWin;
function WinOpen(url,title,w,h){
	w=parseInt(w);
	h=parseInt(h);
	if (!mac) if (new String(newWin)!="undefined" && newWin!=null) if (!newWin.closed) newWin.close();
	newWin=window.open(url,title,"width="+w+",height="+h+",top=0,left=0,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes,z-lock=yes");
	//if (mac) win.resizeTo(w+25,h+50);
	newWin.focus();
}

//opens a new popup window containing the image from parameter:
var newWinImg;
function OpenImage(imgFile){
	if (new String(newWinImg)!="undefined" && newWinImg!=null) if (!newWinImg.closed) newWinImg.close();
	var newWinImg=window.open("","ProjectNewWindowImage","width=100,height=100,top=0,left=0,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=no,menubar=no,status=no,toolbar=no,scrollbars=no,z-lock=yes");
	newWinImg.document.write('<html><head><title>Project :: New Window Image</title></head><body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" bgcolor="#ffffff" onload="window.resizeTo(parseInt(document.images[\'img\'].width)+10,parseInt(document.images[\'img\'].height)+29)"><img src="' + imgFile + '" name="img" /></body></html>');
	newWinImg.document.close();
	newWinImg.focus();
}

//used for paging:
function GoToPageNo(page){
	document.frmPaging.page.value=page;
	document.frmPaging.submit();
}

//display date
function DispayDate(){
	var d=new Date();
	var mydate=new Date();
	var year=mydate.getYear();
	if (year < 1000)
	year+=1900
	var day=mydate.getDay();
	var month=mydate.getMonth();
	var daym=mydate.getDate();
	var minutes=d.getMinutes();
	if (minutes<10) minutes = "0" + minutes;
	
	var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
	var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
	document.write("<font class='whatdate'>"+dayarray[day]+", "+daym+" "+montharray[month]+" "+year+"&nbsp;</font>")
	document.write(" " + "<font class='whatdate'>" + d.getHours() + ":" + minutes +" " + " in UK")
}

//getting dynamically the left position of the left menu:
var xLeftMenu=0;
function GetXPosLeftMenu(){
	if (ns) xLeftMenu=parseInt((parseInt(window.innerWidth)-800)/2)+148;
	else xLeftMenu=parseInt((parseInt(document.body.clientWidth)-800)/2)+148;
}
//-->
