function init() {
	pic1= new Image(); 
	pic1.src="/images/tooltip-middle.gif"; 
	pic2= new Image(); 
	pic2.src="/images/tooltip-middle.gif"; 
	setFontBtns();

}
window.onload = init; 

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}
function showInter(link1){
	//document.getElementById("hcpYesLink").href=link1;
	document.getElementById("interstitial").style.display = "block";
	if(document.getElementById("thumbViewer")){
		document.getElementById("thumbViewer").style.display = "none";
	}
	document.getElementById("extLink").href = link1; 
}
function hideInter(){
	document.getElementById("interstitial").style.display = "none";
	if(document.getElementById("thumbViewer")){
		document.getElementById("thumbViewer").style.display = "block";
	}
}
function showCpInter(link1){
	//document.getElementById("hcpYesLink").href=link1;
	document.getElementById("cpInterstitial").style.display = "block";
	if(document.getElementById("thumbViewer")){
		document.getElementById("thumbViewer").style.display = "none";
	}
}
function hideCpInter(){
	document.getElementById("cpInterstitial").style.display = "none";
	if(document.getElementById("thumbViewer")){
		document.getElementById("thumbViewer").style.display = "block";
	}
}
function closeVideo(){
	document.getElementById("vidInterstitial").style.display = "none";
	document.getElementById("vidPlayer").style.display = "none";
	document.getElementById("vidPlayerContainer").style.display = "none";
	if(document.getElementById("thumbViewer")){
	document.getElementById("thumbViewer").style.display = "block";
	}
	document.getElementById("vidPlayer").innerHTML = "&nbsp;";
}

function playVideo(track){
	document.getElementById("vidInterstitial").style.display = "block";
	document.getElementById("vidPlayerContainer").style.display = "block";
	document.getElementById("vidPlayer").style.display = "block";
	if(document.getElementById("thumbViewer")){
		document.getElementById("thumbViewer").style.display = "none";
	}
	if (track=='recon'){
	document.getElementById("vidPlayer").innerHTML = '<p style="text-align:right;width:600px; font-size:10px;padding-top:35px;"><a href="#" style="color:gray" onclick="closeVideo()">close</a></p>   <div> <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="380">      <param name="movie" value="../swf/recon.swf" />     <param name="quality" value="high" />      <param name="wmode" value="transparent" />    <param name="swfversion" value="9.0.45.0" />      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->      <param name="expressinstall" value="/Scripts/expressInstall.swf" />     <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->      <!--[if !IE]>-->    <object type="application/x-shockwave-flash" data="../swf/recon.swf" width="600" height="380">    <!--<![endif]-->       <param name="quality" value="high" />       <param name="wmode" value="transparent" />     <param name="swfversion" value="9.0.45.0" />      <param name="expressinstall" value="/Scripts/expressInstall.swf" />    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->       <div>         <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>        <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>       </div>       <!--[if !IE]>-->      </object>    <!--<![endif]-->    </object></div>';
	}
	else if (track=='moa'){
	document.getElementById("vidPlayer").innerHTML = '<p style="text-align:right;width:600px; font-size:10px;padding-top:35px;"><a href="#" style="color:gray" onclick="closeVideo()">close</a></p>   <div> <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="480">      <param name="movie" value="../swf/moa.swf" />     <param name="quality" value="high" />      <param name="wmode" value="transparent" />    <param name="swfversion" value="9.0.45.0" />      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->      <param name="expressinstall" value="/Scripts/expressInstall.swf" />     <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->      <!--[if !IE]>-->    <object type="application/x-shockwave-flash" data="../swf/moa.swf" width="600" height="480">    <!--<![endif]-->       <param name="quality" value="high" />       <param name="wmode" value="transparent" />     <param name="swfversion" value="9.0.45.0" />      <param name="expressinstall" value="/Scripts/expressInstall.swf" />    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->       <div>         <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>        <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>       </div>       <!--[if !IE]>-->      </object>    <!--<![endif]-->    </object></div>';
	}
	else if (track =='comp'){
	document.getElementById("vidPlayer").innerHTML = '<p style="text-align:right;width:600px; font-size:10px;padding-top:35px;"><a href="#" style="color:gray" onclick="closeVideo()">close</a></p>   <div> <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="370">      <param name="movie" value="../swf/admin.swf" />     <param name="quality" value="high" />      <param name="wmode" value="transparent" />    <param name="swfversion" value="9.0.45.0" />      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->      <param name="expressinstall" value="/Scripts/expressInstall.swf" />     <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->      <!--[if !IE]>-->    <object type="application/x-shockwave-flash" data="../swf/admin.swf" width="600" height="370">    <!--<![endif]-->       <param name="quality" value="high" />       <param name="wmode" value="transparent" />     <param name="swfversion" value="9.0.45.0" />      <param name="expressinstall" value="/Scripts/expressInstall.swf" />    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->       <div>         <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>        <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>       </div>       <!--[if !IE]>-->      </object>    <!--<![endif]-->    </object></div>';
	}
}

function setFontSize(pos){
	var size = Number(hasCookie())+(pos?pos:0);
	size = size>2?0:size;
	saveCookie(size)
	document.documentElement.lastChild.style.fontSize = ['100%','110%','120%'][size];
}

function saveCookie(size){
	var date = new Date();
	date.setTime(date.getTime()+30*24*60*60*1000);
	document.cookie = "NovoSevenRTFontSize="+size+"; path=/; expires="+date.toGMTString();
	return size;
}

function hasCookie(){
	var cookies = document.cookie.split(';');
	for(var i=0;i < cookies.length;i++){
		var c = cookies[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf("NovoSevenRTFontSize") == 0) return c.substring(20,c.length);
	}
	return 1;//normal
}

function setFontBtns(){
	if(document.getElementById('font-size')){
		document.getElementById('font-size').onclick = function(){
			setFontSize(1);
			return false;
		}
	}
}
function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return [ scrOfX, scrOfY ];
}

function showModal(link1){
       if (link1 != ""){
              document.getElementById("outboundLink").href=link1;
              
       }
       document.getElementById("cpInterstitial").style.display = "block";
	   var myDiv = document.getElementById("cpInterstitial");
	   var myDiv2 = myDiv.getElementsByTagName("div")[0];
	   
		
		var myArray = getScrollXY();
        myDiv2.style.top = (myArray[1] +150) + "px";
       if(document.getElementById("thumbViewer")){
              document.getElementById("thumbViewer").style.display = "none";
       }
}