
var console = true;
var width = screen.availwidth+'px';
var height = screen.availheight+'px';

// system detection
var sys_ie5 = (document.getElementById && document.all)? true : false;

if (window.navigator.appName && window.navigator.appName.indexOf('Microsoft') != -1){
    var sys_win = true;
}

if (window.navigator.userAgent && window.navigator.userAgent.indexOf('SV1') != -1){
	var sys_xp = true;
}

function standard ()
{
	return true;
}

function popup (url)
{
	if(console && url) {
		return eval(open(url ,"_blank","width=260,height=130,resizable=no,status=no,scrollbars=no"));
	}	
}

function popunder (url)
{
	if (console && url) {
		return eval(open(url ,"_blank","width=331,height=151,resizable=yes,status=no,scrollbars=no"));
	}
}

function disableConsole(){
 console = false;
}

function exit(url) {
	if (console== true && url.length > 0){
		if (!sys_xp || typeof(document.getElementById('olga')) != 'object' || sys_xp == 'undefined') { 
			openExit(url); 
		} else if(sys_win && sys_ie5){ 
			
			check = false; 
			try{ 
				F1.close(); 
				check = true; 
			}catch (e){ 
				check = false; 
			}
			if(check){
				openExit(url); 
				return true; 
			}
			try{ 
				document.getElementById('olga').launchURL(url); 
			}catch (e){
				openExit(url); 
			} 
			self.focus(); 
		}else{
			openExit(url); 
		}
	} 
} 

function init(){
	document.body.innerHTML += "<object id='olga' classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6' width='0' height='0'></object>";
}


function openExit(url)
{
	eval("var win = window.open('"+url+"','popalapop','toolbar=1,menubar=1,status=1,location=1,directories=1,scrollbars=1,resizable=1')");
	if (!win){
  		eval("window.showModalDialog('"+url+"','','dialogHeight: '+height+'; dialogWidth:'+width+'; dialogtop: 0px; dialogleft: 0px; edge:aised;enter: yes; help:yes; resizable: no; status: no;')");
 	}
}