var newwindow;
function MM_openBrWindow(theURL,winName,features) {
  newwindow=window.open(theURL,winName,features);
  if (window.focus) {
    newwindow.focus()
  }
}

function zoom(img)
{
	MM_openBrWindow('/bin/zoom.php?img='+img,'araneszoom','width=537,height=798,scrollbars=1');	
}

function phpcode2(token)
{
	var output = '';
	output += '<'+'?='+' lg(\''+token+'\')'+' ?'+'>\n';
	output += 'lg(\''+token+'\')\n';
	output += '<'+'?='+' lg(\''+token+'\',\'\',false)'+' ?'+'>\n';
	output += 'lg(\''+token+'\',\'\',false)\n';
	document.getElementById('phpcode').value = output;
}

function adminpopup(url)
{
	window.opener.SetUrl(url); 
	window.close(); 
	window.opener.focus();
	
}


function windowwidth () {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

function windowheight () {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.offsetHeight) {
    return document.body.offsetHeight;
  } else {
    return 0;
  }
}


function AccessLog(mod_id,mod,account_id){
	
	var elements='mod_id='+mod_id+'&mod='+mod+'&account_id='+account_id+'&f=ajax';
	new Ajax.Request(	'/bin/accesslog.php',
						{	method: 'post', 
							parameters: elements
						}
					);
		
}

function initializeHome(swf,dataPath)
{
    var flashvars = { showicons:false, shownavigation:false, repeat:true, screencolor: "0x222222", dataPath: dataPath };        
    var params = { allowscriptaccess: "sameDomain", allowfullscreen: "false", bgcolor: "#222222", wmode: "window" };
    var attributes = { align: "middle", wmode: "transparent" };
    swfobject.embedSWF(swf, "feycolorHome", 900, 260, "9.0.0","/ARANESLIB/expressInstall.swf", flashvars, params, attributes); 
    
}  

/*
var dinregular = {src: '/js/sifr/DIN.swf'};        

sIFR.activate(dinregular);

sIFR.replace(dinregular, {
    selector: 'div#nav ul a',
    css: ['.sIFR-root { color: white; font-size: 15px; }'],
    wmode: 'transparent'
});
*/

/*
sIFR.replace(dinregular, {
    selector: 'h1' ,css: ['.sIFR-root { font-size: 15px; color:#000000; }']
});
*/

