/*
	Mike Cerdenia
	BusinessWorld Online, Inc.
	September 2004
*/

// CSS PLATFORM SNIFFER

var csstype="external" 								//Specify type of CSS to use. "Inline" or "external"
var mac_css='body{font-size: 14pt; }' 					//if "inline", specify mac css here
var pc_css='body{font-size: 12pt; }' 					//if "inline", specify PC/default css here
var mac_externalcss='http://codex.bworldonline.com/assets/StylesheetMac.css' 			      	//if "external", specify Mac css file here
var pc_externalcss='http://codex.bworldonline.com/assets/StylesheetPC.css'   					//if "external", specify PC/default css file here

var mactest=navigator.userAgent.indexOf("Mac")!=-1
if (csstype=="inline"){
document.write('<style type="text/css">')
if (mactest)
document.write(mac_css)
else
document.write(pc_css)
document.write('</style>')
}
else if (csstype=="external")
document.write('<link rel="stylesheet" type="text/css" href="'+ (mactest? mac_externalcss : pc_externalcss) +'">')


// OPEN NEW SMALL WINDOW
function BrWindow(theURL,winName,features) 
{
window.open(theURL,winName,features);
}

// OPEN SMALL WINDOW CENTERED
var win = null;
function NewWindow(mypage,myname,w,h,scroll)
{
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

// CLOSE WINDOW
function wclose() 
{
self.close();
}

// SEND URL
function sendURL (myemail) 
{
location="mailto:"+myemail+"?subject="+escape("74 Server")+"&body="+location.href;
}

//REFRESH
function refresh() { window.location.reload( false ); }

// ROLLOVERS
function init() 
{
  if (!document.getElementById) return
  var imgOriginSrc;
  var imgTemp = new Array();
  var imgarr = document.getElementsByTagName('img');
  for (var i = 0; i < imgarr.length; i++) {
    if (imgarr[i].getAttribute('hsrc')) {
        imgTemp[i] = new Image();
        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
        imgarr[i].onmouseover = function() {
            imgOriginSrc = this.getAttribute('src');
            this.setAttribute('src',this.getAttribute('hsrc'))
        }
        imgarr[i].onmouseout = function() {
            this.setAttribute('src',imgOriginSrc)
        }
    }
  }
}
onload=init;
