function SetFocus(obj_id)
{
	cur_obj = document.getElementById(obj_id);
	if(cur_obj != null)
	{
		cur_obj.focus();
	}
}
//----Window
function OpenWindow(link,WindowName)
{
window.open(link,WindowName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=620,height=580');
}

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 0;
PositionY = 0;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = false;

// Do not edit below this line...
// ================================

var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
var isMZ=(navigator.appName.indexOf("Mozilla")!=-1)?1:0;

var optNN='scrollbars=no,resizable=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=yes,width=150,height=100,left='+PositionX+',top='+PositionY;
var optMZ='scrollbars=no,resizable=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optDefault='scrollbars=yes,resizable=yes,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;


function popImage(imageURL,imageTitle)
{

if (isIE){imgWin=window.open('about:blank','',optIE);}
else {imgWin=window.open('about:blank','',optNN);}


with (imgWin.document){
writeln('<html><head><title>Loading...</title><link rel=stylesheet href=styles.css ><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');

writeln('var isIE;');

writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');

writeln('if (isIE){');
writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width+50,height+50);}');



writeln('else{');       
writeln('window.innerWidth=document.images["George"].width+50;');
writeln('window.innerHeight=document.images["George"].height+60;}}');


writeln('function doTitle(){document.title="'+imageTitle+'";}');

writeln('</sc'+'ript>');
if (!AutoClose) writeln('<link href="CSS/style.css" rel="stylesheet" type="text/css"></head><body bgcolor=white scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('<link href="CSS/style.css" rel="stylesheet" type="text/css"></head><body  scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<p align=center ><img name="George" src='+imageURL+' style="display:block" OnError="this.src = \'../../Images/noimg.gif\'"></p>');

writeln('<p align=center ><center><input type=button value=Close  name=send OnClick="window.close();"  class=button1 align=center onmouseover="this.className = \'button2\'  ;" onmouseout="this.className = \'button1\';"></center></p><p></p></body></html>');
close();		
}
}
/////


function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}
function openPictureWindow_Fever(name,title,posLeft,posTop)
		{  // v4.01
		
			var object=document.getElementById(name);
			//alert(object.innerHTML);
			//document.getElementById('DivTest1').style=1;
			newWindow = window.open("","newWindow","width=600,menubar=yes,scrollbars=no,left="+posLeft+",top="+posTop);
			newWindow.document.open();
			newWindow.document.write('<html><head><title>'+title+'</title><link rel="stylesheet" type="text/css" href="../CSS/mainstyle.css"><link rel="stylesheet" type="text/css" href="../CSS/style.css"><link rel="stylesheet" type="text/css" media="print" href="../CSS/print.css"></head><body bgcolor="#FFFFFF" leftmargin="70" topmargin="40" marginheight="30" marginwidth="50" onBlur="self.close()">'); 
			newWindow.document.write(object.innerHTML); 	
			newWindow.document.write('</body></html>');
			newWindow.document.close();
			newWindow.focus();
		}

