/*most of this mess was created by igor barmin at ITPremium.com email:sterh2k@hotbox.ru */
function handleErr(msg,url,l)
{
var txt="There was an error on this page.\n\n"
txt+="Error: " + msg + "\n"
txt+="URL: " + url + "\n"
txt+="Line: " + l + "\n\n"
txt+="Click OK to continue.\n\n"
alert(txt)
return true
}
function quiet_err(){return true;}
onerror=handleErr
/*check for flash plugin. works with IE!
great thanks to Peter-Paul Koch at http://www.quirksmode.org/
for the original idea*/
var flashinstalled = 0;
var flashversion = 0;
var msdetect = "false"
if(navigator.plugins && navigator.plugins.length){
	x=navigator.plugins["Shockwave Flash"];
	if(x){
		flashinstalled = 2;
		if (x.description){
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	}else flashinstalled = 1;
	if(navigator.plugins["Shockwave Flash 2.0"]){
		flashinstalled = 2;
		flashversion = 2;
	}
}else if(navigator.mimeTypes && navigator.mimeTypes.length){
	x=navigator.mimeTypes['application/x-shockwave-flash'];
	if(x && x.enabledPlugin)flashinstalled = 2;
	else flashinstalled = 1;
}else {
// IE flash detection.
	for(var i=10; i>0; i--){
		flashversion = 0;
		try{
		var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
		flashversion = i;
		break;
		}catch(e){}
	}
	if(flashversion)flashinstalled=2;
	else flashinstalled=1;
}
//flashinstalled=0;
/* redirection disabled due to infinite redir*/
if(redir_url && false)if(flashinstalled!=2)window.location=redir_url;
function open_window(url,name,w,h) 
{
window.open(url,name,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes, width="+w+" ,height="+h);
return false;
}
function bookmark()
{
	uri=window.location;
	who=document.title;
	if (document.all)ie=true;
	else ie=false;
	if(window.sidebar)mf=true;
	else mf=false;
	if(!ie && !mf)return false;
/*	if(confirm(q)==false)return false;*/
	if(ie)window.external.AddFavorite(uri,who);
	if(mf){
		window.sidebar.addPanel(who,uri,"main");
	}
	return false;
}
function check_flash()
{
	if(!flashinstalled || flashinstalled == 1){
		alert("no flash plugin found "+flashinstalled )
		return
	}
	alert("Macromedia Flash "+ flashversion+ " found")
}

