if(parseInt(navigator.appVersion.charAt(0)) >= 4) {
var isNN = (navigator.appName=="Netscape")?1:0;
var isIE = (navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN = 'scrollbars=no,width='+500+',height='+500+',left='+100+',top='+100;
var optIE = 'scrollbars=no,width=150,height=100,left='+100+',top='+100;
function image_popup(image_url,window_title) {
	if(isNN) {
		imgWin=window.open('about:blank','',optNN);
	}
	if(isIE) {
		imgWin=window.open('about:blank','',optIE);
	}
	with(imgWin.document) {
		writeln('<html>');
		writeln('<head>');
		writeln('<title>'+window_title+'</title>');
		writeln('<meta name="description" content="{/literal}{$website_description}{literal}" />');
		writeln('<meta name="keywords" content="{/literal}{$website_keywords}{literal}" />');
		writeln('<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />');
		writeln('<style type="text/css">body { margin: 0px; background-color: #FFFFFF; }</style>');
		writeln('<sc'+'ript type="text/javascript">');
		writeln('var isNN,isIE;');
		writeln('if(parseInt(navigator.appVersion.charAt(0)) >= 4) {');
		writeln('	isNN=(navigator.appName=="Netscape")?1:0;');
		writeln('	isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;');
		writeln('}');
		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,height);');
		writeln('	}');
		writeln('	if (isNN){');
		writeln('		window.innerWidth = document.images["image"].width+20;');
		writeln('		window.innerHeight = document.images["image"].height+20;');
		writeln('	}');
		writeln('}');
		writeln('</sc'+'ript>');
		writeln('</head>');
		writeln('<body scroll="no" onload="reSizeToImage(); self.focus();">');
		writeln('<table cellpadding="0" cellspacing="0" width="100%" height="100%" border="0">')
		writeln('<tr>')
		writeln('	<td align="center" valign="middle">')
		writeln('		<a href="javascript: self.close();">');
		writeln('			<img name="image" src="'+image_url+'" alt="'+window_title+'" style="display: block; border:0;" />');
		writeln('		</a>');
		writeln('	</td>')
		writeln('</tr>')
		writeln('</table>')
		writeln('</body>');
		writeln('</html>');
		close();		
	}
}
var submitcount = 0;
function submitCheck() {
	if(submitcount == 0) {
		// Sumbit form
		submitcount ++;	
		return true;	
	} else {
		alert("Transaction is in progress.");
		return false;
	}
}
function confirm_link(message, url) {
	if(confirm(message)) location.href = url;
}