﻿// assorted javascript functions

// sort out the screen size
var screenW = 640, screenH = 480;
if (parseInt(navigator.appVersion)>3) {
 screenW = screen.width;
 screenH = screen.height;
}
else if (navigator.appName == "Netscape" 
    && parseInt(navigator.appVersion)==3
    && navigator.javaEnabled()
   ) 
{
 var jToolkit = java.awt.Toolkit.getDefaultToolkit();
 var jScreenSize = jToolkit.getScreenSize();
 screenW = jScreenSize.width;
 screenH = jScreenSize.height;
}


function start_fleximargin() {
	if (screenW <= 800) tabWidth = "96%";
	else if (screenW <= 1024) tabWidth = "88%";
		else tabWidth = "80%";
	document.write(
	 '<table align="center" width="'+tabWidth+'" cellspacing="0" cellpadding="0" border="0">'
	)
}
function switch_lang(newlang) {
document.location.search="?lang="+newlang;
}
function ston(txt)
{
	window.status=txt;
}
function stoff()
{
	window.status="";
}
function spawn(TargetUrl)
{
	popupWin = window.open(TargetUrl, 'remote', 'location,scrollbars,resizable,height=450,width=400')
}
function newwin(img,source,height,width,caption) {
	height = height+100;
	width=width+50;
	myRef = window.open('admin/show_largeimage.php?img='+ img + '&source=' + source + '&caption=' + caption,'largeimgwin',
'left=20,top=20,width='+width+',height='+height+',toolbar=0,resizable=0,scrollbars=1');
	return;
}

