function BrowserDetector()
{
	this.dom = (document.getElementById)? true : false;
	this.nn4 = (document.layers)? true : false;
	this.ie4 = (document.all && !this.dom);
	this.netscape = (navigator.appName == "Netscape" && !window.opera) && (parseInt(navigator.appVersion) >= 4);
	this.explorer = (document.all)? true : false;
	this.opera5 = (navigator.userAgent.search(/opera.?5/i) >= 0)? true : false;
	this.opera7 = (navigator.userAgent.search(/opera.?[789]/i) >= 0)? true : false;
	this.mlin = (navigator.userAgent.search(/mozilla.*linux/i) >= 0)? true : false;
	this.mozilla=this.dom && navigator.appName=="Netscape"; 
}
var browser = new BrowserDetector();

function makeElement(blockID)
{
	if(browser.dom)  {return document.getElementById(blockID);}
    else if(browser.ie4||browser.opera5) return document.all[blockID];
	else if(browser.netscape) return document.layers[blockID];
    else return false; 
}

function open_image(imgUrl,imgWidth,imgHeight)
{
   winTop=(screen.height-imgHeight)/2;
   winLeft=(screen.width-imgWidth)/2;
   if(imgHeight > screen.height) imgHeight = screen.height-100;
   if(imgWidth > screen.width) imgWidth = screen.width-50;
   window.open(imgUrl,"new_image","menubar=0,toolbar=0,top=0,left="+winLeft+",width="+(imgWidth+50)+",height="+(imgHeight+30)+",scrollbars=1");
}

function check_mail(mail)
{
	var reg = /^[a-zA-Z0-9][a-zA-Z0-9\._-]+@[a-zA-Z0-9_\.-]+\.[a-zA-Z]{2,4}$/;
	if(mail.value == '') return true;
	else return reg.test(mail.value);
} 

function do_flash()
{
	window.open('/flash/mainfla_done.html','new_win','menubar=0, toolbar=0,height=595,top=0,left=0,width=650,status=0');
}