// JavaScript Document
<!--
// mmLoadMenus()
function mmLoadMenus() {
  if (window.mm_menu_0331100821_0) return;
  window.mm_menu_0331100821_0 = new Menu("root",137,15,"Verdana, Arial, Helvetica, sans-serif",9,"#FFFFFF","#FF0000","#660000","#660000","left","middle",3,0,1000,-5,7,true,true,true,0,false,false);
  mm_menu_0331100821_0.addMenuItem("Personal Credit Card","location='personal-credit-card.htm'");
  mm_menu_0331100821_0.addMenuItem("Premium Card","location='premium-credit-card.htm'");
  mm_menu_0331100821_0.addMenuItem("Platinum MasterCard","location='platinum-master-card.htm'");
  mm_menu_0331100821_0.addMenuItem("Commercial Card","location='commercial-credit-card.htm'");
  mm_menu_0331100821_0.addMenuItem("Compare Cards","location='compare-credit-cards.htm'");
  mm_menu_0331100821_0.hideOnMouseOut=true;
  mm_menu_0331100821_0.bgColor='#000000';
  mm_menu_0331100821_0.menuBorder=1;
  mm_menu_0331100821_0.menuLiteBgColor='#660000';
  mm_menu_0331100821_0.menuBorderBgColor='#510000';

mm_menu_0331100821_0.writeMenus();
} // END mmLoadMenus()
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function displayLayers() { //adapted from MM_showHideLayers except with "display=none" to hide elements
  var i,p,v,obj,args=displayLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
	//alert('displayLayers finished!');
}

function toggleDisplay(divName){
	if ((obj=MM_findObj(divName))!=null) {
		obj=obj.style;
		//alert(obj.display + " and divname: " + divName);	
		(obj.display == 'block') ? displayLayers(divName,'','hide') : displayLayers(divName,'','show');
	}
}

function toggleSlide(divName){
	/*
	var i,p,v,obj,args=toggleSlide.arguments;
	for (i=0; i<(args.length); i++){ 
		alert(MM_findObj(args[i]));
		if ((obj=MM_findObj(args[i]))!=null) { 
			obj=obj.style;
			(obj.display == 'block') ? Slide(args[i]).up() : Slide(args[i]).down();
		}
	}*/

	if ((obj=MM_findObj(divName))!=null) {
		obj=obj.style;
		//alert(obj.display + " and divname: " + divName);	
		(obj.display == 'block') ? Slide(divName).up() : Slide(divName).down();
	}
}

var CCNavSrcDefault = '';
var CCNavSrcOn = '../../images/global/nav/nv_crditcrd_on.jpg';



function openCCNav(){
	CCNavSrcDefault = document.getElementById('nv_crditcrd_on').src;
	displayLayers('ccnav','','show');
	document.getElementById('nv_crditcrd_on').src = CCNavSrcOn;
}

function closeCCNav(){
	displayLayers('ccnav','','hide');
	document.getElementById('nv_crditcrd_on').src = CCNavSrcDefault;
}


/* START - New Menu Script ************************** */
// USAGE: <a onmouseover="navDrop(this.id,'over');" onmouseout="navDrop(this.id);" id="UniqueID" href="SomeLink">Text</a>
var navTimeout = new Array();
function navOver(elm) {
	if (elm.tagName.toLowerCase() != 'li') elm = getParentByTagName(elm, 'li');
	if (navTimeout[elm]) clearTimeout(navTimeout[elm]);
	var navitems = elm.parentNode.getElementsByTagName('li');
	for (var i=0; i < navitems.length; i++) {
		if (navitems[i].parentNode == elm.parentNode && navitems[i] != elm) {
			if (navitems[i].className.indexOf('navOn') != -1) navitems[i].className = navitems[i].className.replace('navOn','');
		}
	}
	if (elm && elm.className.indexOf('navOn') == -1) elm.className += ' navOn';
}
function navOut(elm) {
	function hideNav() {
		if (elm && elm.className.indexOf('navOn') != -1) {
			elm.className = elm.className.replace('navOn','');
		}
	}
	if (navTimeout[elm]) clearTimeout(navTimeout[elm]);
	if (elm.tagName.toLowerCase() != 'li') elm = getParentByTagName(elm, 'li');
	if (elm) navTimeout[elm] = setTimeout(hideNav,500);
}
/* END - New Menu Script ************************** */

//if Internet Explorer
var isIE = (navigator.appName.indexOf ("Microsoft") !=-1) ? true : false;

function getFlashMovieObject(movieName){
  if (window.document[movieName])  {
      return window.document[movieName];
  }
  if (!isIE)  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  } else {
    return document.getElementById(movieName);
  }
}

function pageLoader(){
	//page loading functions go here...
	MM_preloadImages('/us/cards/phillips_av/images/global/nav/nv_crditcrd_on.jpg','/us/cards/phillips_av/images/global/nav/nv_aos_on.jpg','/us/cards/phillips_av/images/global/nav/nv_sec_on.jpg','/us/cards/phillips_av/images/global/nav/nv_faq_on.jpg','/us/cards/phillips_av/images/global/nav/nv_contact_on.jpg');
}

//PopUp function
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=600,left = 65,top = 50');");
}

//autorun loading functions when page is loaded
window.onload = pageLoader;

//security and privacy broswer check
function checkBrowser()
{
   var isCompliant = "no";
   if((navigator.userAgent.indexOf("U;") > -1 || navigator.userAgent.indexOf("U)") > -1 ))
   {
      isCompliant = "yes";
   }
   if((navigator.userAgent.indexOf("I;") > -1 || navigator.userAgent.indexOf("I)") > -1 ))
   {
      isCompliant = "no";
   }
   else if(navigator.userAgent.indexOf("MSIE") > -1 )
   {
      if (parseFloat(navigator.appVersion)>= 4 )
      {
         isCompliant = "yes";
      }
   }

   if(isCompliant == "yes")
   {
         window.open('compliant.htm','CheckBrowser','scrollbars,width=525,height=175');
   }
   else if (isCompliant  == "no")
   {
         window.open('non-compliant.htm','CheckBrowser','scrollbars,width=525,height=175');
   }
}



/***********************************************
* Drop Down/ Overlapping Content- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
function getposOffset(overlay, offsettype){
	var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
	var parentEl=overlay.offsetParent;
	while (parentEl!=null){
	totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
	parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
	if (document.getElementById){
		var subobj=document.getElementById(subobjstr)
		subobj.style.display=(subobj.style.display!="block")? "block" : "none"
		var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0)+120; //adding offset for both ie & ffox
		var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)-(isIE?16:51); //adding custom offsets for ie & ffox
		subobj.style.left=xpos+"px"
		subobj.style.top=ypos+"px"
		return false
	} else {
		return true
	}
}

function overlayclose(subobj){
	document.getElementById(subobj).style.display="none"
}
//-->