// JavaScript Document

if(self.innerHeight)
distance = self.innerHeight;
else
distance = document.documentElement.clientHeight;
iheight = (distance-600)/2;
if (distance <= 600) {
	document.write(' <style type="text/css"> ');
	document.write(' #main { ');
	document.write(' margin-top:0px; ');
	document.write(' } ');
	document.write(' </style> ');
}
else {
	document.write(' <style type="text/css"> ');
	document.write(' #main { ');
	document.write(' margin-top:'+ iheight +'px; ');
	document.write(' } ');
	document.write(' </style> ');
}

window.onresize=function () {
	window.location.reload();
}

function externallinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externallinks;