// JScript File

if (top != self)
top.location=self.location;


function doClearEmail(theText) 
{
     if (theText.value == theText.defaultValue)
		 {
         theText.value = ""
     }
 }
 function doBackEmail(theText) 
{
     if (theText.value == "")
		 {
         theText.value = "Your E-mail Address"
     }
 }
 function doClearSrch(theText) 
{
     if (theText.value == theText.defaultValue)
		 {
         theText.value = ""
     }
 }
 function doBackSrch(theText) 
{
     if (theText.value == "")
		 {
         theText.value = " Search"
     }
 }
 
function externalLinks()
{ 
 var LocPath1 = location.pathname;
 var LocPath2 = LocPath1.split("/");
 var LocPath = LocPath2[1];
 //document.write(LocPath2);

 if (LocPath == "")
 {
    LocPath = "corporate";
 }
 //alert(LocPath);
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i];
   //alert(anchor.href);

   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
   {
	anchor.target = "_blank"; }

	if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "frame")
    {
	    var newLink = "/"+LocPath+'/frames.aspx?page='+anchor.href;
	    anchor.href = anchor.href.replace(anchor.href,newLink); }

   //alert(anchor.getAttribute("href") + "*" + anchor.pathname.replace("/","").substr(0,6) + "*" + anchor.getAttribute("rel"));
   if (anchor.getAttribute("href") && anchor.pathname.replace("/","").substr(0,6) == "unauth" && anchor.getAttribute("rel") != "external") 
	{
	    var newLink = "/"+LocPath+'/frames.aspx?page='+anchor.href;
	    anchor.href = anchor.href.replace(anchor.href,newLink);
	} 
// END FOR LOOP
 } 
// END IF
}

//FUNCTION TO AUTO-FIND TD HEIGHT & PLACE THAT HEIGHT ON DIV NAV
function doDivHeight() 
		{
	    var divNavs = new Array('interiorNav','conditionNav','healthyNav','healthyHomeNav','lifeNav','echoNav', 'familyNav', 'accountingNav');
			
			//var divNav = document.getElementById('interiorNav');
			//var divNav2 = document.getElementById('conditionNav');
			
			var divTD = document.getElementById('rightMain').offsetHeight;
			for (i=0;i<divNavs.length;i++)
        {
          var divNav = document.getElementById(divNavs[i]);
          if (divNav != null)
				{
					divNav.style.height = divTD+"px";
				}
        }
        
		}
// END HEIGHT ON DIV

// VIDEO JS

function video(vURL,skin) {
   articleWin = window.open('http://media.triwest.com/video/console.asp?video='+vURL+'&skin='+skin,'myWindow','location=0,status=0,scrollbars=0,width=450,height=350');
   if(articleWin.focus) articleWin.focus();
	}
		function audio(mURL,skin) {
   articleWin = window.open('http://media.triwest.com/video/mp3Console.asp?audio='+mURL+'&skin='+skin,'myWindow','location=0,status=0,scrollbars=0,width=450,height=350');
  	}

