function set_default_focus() {
	for (var i=0; i<document.forms.length; i++) {
		for (var j=0; j<document.forms[0].elements.length; j++) {
			if (document.forms[i].elements[j].type == 'text') {
				document.forms[i].elements[j].focus();
				return;
			}
		}
	}

}

function InsertDateVars(theform) { 
	var dateNow = new Date();
	theform.tzo.value = parseInt(-dateNow.getTimezoneOffset()*60); 
	theform.appname.value = navigator.appName; 
	theform.appversion.value = navigator.appVersion; 
	return true;
} 

function LinkOver(obj) {
	 obj.style.color = '#00CC00';
}

function LinkOut(obj) {
     obj.style.color = '#330066';
}

function open_win(what_link){ 
var the_url = "http://localhost"
var the_x = 500;
var the_y = 600;
the_x -= 0;
the_y -= 0;
var how_wide = screen.availWidth;
var how_high = screen.availHeight;
if(what_link != ""){the_url=what_link;}
var the_toolbar = "no";
var the_addressbar = "no";
var the_directories = "no";
var the_statusbar = "no";
var the_menubar = "no";
var the_scrollbars = "yes";
var the_do_resize =  "yes";
var the_copy_history = "no";
top_pos = 0;
left_pos = 0;
if (window.outerWidth ){
var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",outerWidth="+the_x+",outerHeight="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
site=open(the_url, "DisplayWindow", option);
var Opera = (navigator.userAgent.indexOf('Opera') != -1);
if(Opera){
site.resizeTo(the_x,the_y);
site.moveTo(0,0);
}
}
else
{
var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",Width="+the_x+",Height="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
site=open('', "DisplayWindow", option);
site.location=the_url;
if(site.open){site.focus();return false;}
site.resizeTo(the_x,the_y);
}
} 