function projectLink() { 
  var i, args=projectLink.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function projectLinkIn(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/icon_arrow_10w.gif";
  
  bTmp = sObj.getElementsByTagName("span");
  for(i=0;i<bTmp.length;i++)
  	bTmp[i].className = "tnm_big_orange";
}
function projectLinkOut(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/icon_arrow1.gif";
  
  bTmp = sObj.getElementsByTagName("div");
  for(i=0;i<bTmp.length;i++)
  	bTmp[i].className = "black_link";
}
function linkIn(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/icon_barrow2.gif";
}
function linkOut(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/icon_barrow1.gif";
}

function linkInSmall(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/icon_arrow2.gif";
}
function linkOutSmall(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/icon_arrow1.gif";
}

function linkIn9(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/arrow_link2_9w.gif";
}
function linkOut9(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/arrow_link1_9w.gif";
}
function printIn(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/icon_print2.gif";
}
function printOut(sObj){
  aTmp = sObj.getElementsByTagName("img");
  aTmp[0].src = "http://www.proventus.se/img/icon_print1.gif";
}

function hideUnusedReportLinks(sObj) {
	pNodeList = sObj.getElementsByTagName("div");
	pLinkList = [];
	for(var i=0;i<pNodeList.length;i++) {
		if(pNodeList[i].className == "links")
			checkNode(pNodeList[i]);
	}
}
function checkNode(sObj) {
	numlinks = sObj.getElementsByTagName("a");
	if(numlinks.length == 0)
		sObj.style.visibility = "hidden";
}

function getXMLName() {
	var xmlname = document.getElementById("flashcontent").innerHTML;
	var startAt = xmlname.indexOf("-->") + 3;
	var endAt = xmlname.lastIndexOf("<!--");
	xmlname = xmlname.substr(startAt, endAt - startAt);
	return xmlname;
}
function printPage() 
{
	var da = (document.all) ? 1 : 0;
	var pr = (window.print) ? 1 : 0;
	
	if(!pr)
		return;
	
	var printArea = document.getElementById("print");
	
	if(printArea == null && da) 
		printArea = document.all.mainareadiv;
		
	
	if(printArea) 
	{
		var sStart = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.proventus.se/css/screen.css\" /><body onload=\"javascript:window.print();\"><img src=\"http://www.proventus.se/img/print_head.gif\"><br><br><div class=\"company_holder_center\">";
		sStop = "<div id=\"footer_print\"><div class=\"footerline_print\">&nbsp;</div><div class=\"footer_text\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COPYRIGHT &copy; 2006 PROVENTUS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>PHONE</strong>: +46 8 723 31 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>E-MAIL</strong>: <a href=\"mailto:info@proventus.se\">INFO@PROVENTUS.SE</a></div></div></body></html>";

		var w = window.open('about:blank','printWin','width=685,height=600,scrollbars=yes,resizable=yes');
		wdoc = w.document;
		wdoc.open();
		wdoc.write( sStart + printArea.innerHTML ) ;
		wdoc.writeln( sStop );
		wdoc.close();
	}
}
function projectOnMouseOver(oObj) {
	aList = oObj.getElementsByTagName("span");
	bList = oObj.getElementsByTagName("a");
	cList = oObj.getElementsByTagName("img");
	
	for(var i=0;i<aList.length;i++)
		aList[i].className = "p_big_black_hover";
	for(var i=0;i<bList.length;i++)
		bList[i].className = "a_hover";
	for(var i=0;i<cList.length;i++)
		cList[i].src = cList[i].src.replace("_inactive", "_active");
}
function projectOnMouseOut(oObj) {
	aList = oObj.getElementsByTagName("span");
	bList = oObj.getElementsByTagName("a");
	for(var i=0;i<aList.length;i++)
		aList[i].className = "p_big_black";
	for(var i=0;i<bList.length;i++)
		bList[i].className = "";
	for(var i=0;i<cList.length;i++)
		cList[i].src = cList[i].src.replace("_active", "_inactive");

}
function projectOnClick(oObj) {
	aList = oObj.getElementsByTagName("a");
	window.location = aList[0];
}


function CorrectEmailaddress(SubscriberForm){
if (SubscriberForm.pf_Email.value.length > 255)
{
alert("Ange som mest 255 tecken i \"Epostadress\" Fält.");
SubscriberForm.pf_Email.focus();
return (false);
 }
if (SubscriberForm.pf_Email.value == "")
{
alert("Ange värdet för \"Epostadress\" Fält.");
SubscriberForm.pf_Email.focus();
return (false);
 }
if (SubscriberForm.pf_Email.value.length < 7)
{
alert("Ange minst 7 tecken i \"Epostadress\"Fält.");
SubscriberForm.pf_Email.focus();
return (false);
 }
pf_Email=document.SubscriberForm.pf_Email.value
at=pf_Email.indexOf("@");
lastat=pf_Email.lastIndexOf("@");
dot=pf_Email.lastIndexOf(".");
if(at<1||at!=lastat||dot<at){
alert("Din epostadress är inte rätt. Försök igen.");
return false;}
}

function openFullScreenPopup(url, name, fullscreen, toolbar, location, status, menubar, scrollbars, resizable, copyhistory) {
    var width, height;
    var isMac = (navigator.appVersion.indexOf("Mac") != -1);

    width = (screen.availWidth ? screen.availWidth : 860);
    height = (screen.availHeight ? screen.availHeight : 640);

    height -= 10;
    width -= 10;
    if (isMac) {
        height -= 20;
    }

    if (name == null || name == "") {
        name = "default";
    }
    var windowAttributes = "left=0, top=0"
            + ", width=" + width
            + ", height=" + height
            + ", fullscreen=" + fullscreen
            + ", toolbar=" + toolbar
            + ", location=" + location
            + ", status=" + status
            + ", menubar=" + menubar
            + ", scrollbars=" + scrollbars
            + ", resizable=" + resizable
            + ", copyhistory=" + copyhistory

    var theWindow = window.open(url, name, windowAttributes);
    if (theWindow != null) {
        theWindow.focus();
    }
}


