// OPEN SOURCE BROWSER & PLATFORM DETECTION  
    var agt=navigator.userAgent.toLowerCase();
    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);
    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);
    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);
    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
    var is_webtv = (agt.indexOf("webtv") != -1); 
    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    var is_AOLTV = is_TVNavigator;
    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));
    var winTitle = "";
    // *** JAVASCRIPT VERSION CHECK ***
    var is_js;
    if (is_nav2 || is_ie3) is_js = 1.0;
    else if (is_nav3) is_js = 1.1;
    else if (is_opera5up) is_js = 1.3;
    else if (is_opera) is_js = 1.1;
    else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2;
    else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3;
    else if (is_hotjava3up) is_js = 1.4;
    else if (is_nav6 || is_gecko) is_js = 1.5;
    // NOTE: In the future, update this code when newer versions of JS
    // are released. For now, we try to provide some upward compatibility
    // so that future versions of Nav and IE will show they are at
    // *least* JS 1.x capable. Always check for JS version compatibility
    // with > or >=.
    else if (is_nav6up) is_js = 1.5;
    // NOTE: ie5up on mac is 1.4
    else if (is_ie5up) is_js = 1.3
    // HACK: no idea for other browsers; always check for JS version with > or >=
    else is_js = 0.0;
    // *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all
    //        Win32, so you can't distinguish between Win95 and WinNT.
    var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
    // is this a 16 bit compiled version?
    var is_win16 = ((agt.indexOf("win16")!=-1) || 
               (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || 
               (agt.indexOf("windows 16-bit")!=-1) );  
    var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
                    (agt.indexOf("windows 16-bit")!=-1));
    var is_winme = ((agt.indexOf("win 9x 4.90")!=-1));
    var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1));
    // NOTE: Reliable detection of Win98 may not be possible. It appears that:
    //       - On Nav 4.x and before you'll get plain "Windows" in userAgent.
    //       - On Mercury client, the 32-bit version will return "Win98", but
    //         the 16-bit version running on Win98 will still return "Win95".
    var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
    var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
    var is_win32 = (is_win95 || is_winnt || is_win98 || 
                    ((is_major >= 4) && (navigator.platform == "Win32")) ||
                    (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));
    var is_os2   = ((agt.indexOf("os/2")!=-1) || 
                    (navigator.appVersion.indexOf("OS/2")!=-1) ||   
                    (agt.indexOf("ibm-webexplorer")!=-1));
    var is_mac    = (agt.indexOf("mac")!=-1);
    // hack ie5 js version for mac
    if (is_mac && is_ie5up) is_js = 1.4;
    var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) || 
                               (agt.indexOf("68000")!=-1)));
    var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) || 
                                (agt.indexOf("powerpc")!=-1)));
    var is_safari   = (agt.indexOf("safari")!=-1);
    var is_sun   = (agt.indexOf("sunos")!=-1);
    var is_sun4  = (agt.indexOf("sunos 4")!=-1);
    var is_sun5  = (agt.indexOf("sunos 5")!=-1);
    var is_suni86= (is_sun && (agt.indexOf("i86")!=-1));
    var is_irix  = (agt.indexOf("irix") !=-1);    // SGI
    var is_irix5 = (agt.indexOf("irix 5") !=-1);
    var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1));
    var is_hpux  = (agt.indexOf("hp-ux")!=-1);
    var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1));
    var is_hpux10= (is_hpux && (agt.indexOf("10.")!=-1));
    var is_aix   = (agt.indexOf("aix") !=-1);      // IBM
    var is_aix1  = (agt.indexOf("aix 1") !=-1);    
    var is_aix2  = (agt.indexOf("aix 2") !=-1);    
    var is_aix3  = (agt.indexOf("aix 3") !=-1);    
    var is_aix4  = (agt.indexOf("aix 4") !=-1);    
    var is_linux = (agt.indexOf("inux")!=-1);
    var is_sco   = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1);
    var is_unixware = (agt.indexOf("unix_system_v")!=-1); 
    var is_mpras    = (agt.indexOf("ncr")!=-1); 
    var is_reliant  = (agt.indexOf("reliantunix")!=-1);
    var is_dec   = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) || 
           (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) || 
           (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1)); 
    var is_sinix = (agt.indexOf("sinix")!=-1);
    var is_freebsd = (agt.indexOf("freebsd")!=-1);
    var is_bsd = (agt.indexOf("bsd")!=-1);
    var is_unix  = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux || 
                 is_sco ||is_unixware || is_mpras || is_reliant || 
                 is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);
    var is_vms   = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1));
//--> end hide JavaScript

//THIS BLOCK OF JAVASCRIPT IS FOR POP-UP WINDOWS...
function openBrWindow(theURL,winName,features) {
  newWin = window.open(theURL,winName,features);
  newWin.focus();
  if(!newWin.opener){newWin.opener = self;}
  newWin.opener.opener = top;
  newWin = null;
}
function openOffsiteWindow(theURL,winWidth,winHeight) {
  features = "top=50,left=50,width=" +winWidth+ ",height=" +winHeight+ ",scrollbars=yes,toolbar=yes,location=yes,status=yes,menubar=yes,resizable=yes";
  newWin = window.open(theURL,"offsite",features);
  newWin.focus();
  if(!newWin.opener){newWin.opener = window;}
  newWin.opener.name = "openerYMIA";
  newWin.opener.opener = top;
  newWin = null;
}
var newOnsiteWin;
function openOnsiteWindow01(theURL,winWidth,winHeight) {
  features = "top=50,left=50,width=" +winWidth+ ",height=" +winHeight+ ",scrollbars=yes,toolbar=no,location=no,status=no,menubar=no,resizable=yes";
  if(newOnsiteWin && !newOnsiteWin.closed){newOnsiteWin.close();}
  newOnsiteWin = window.open(theURL,"onsite01",features);
  newOnsiteWin.focus();
  if(!newOnsiteWin.opener){newOnsiteWin.opener = window;}
  newOnsiteWin.opener.name = "openerYMIA";
  newOnsiteWin.opener.opener = top;
}
function loadMoviePlayer(listId,winTitle){
    winTitle = (winTitle)?winTitle:"Yamaha"; 
    listId = (listId)?listId:"idcintro";
    //theURL = "/swf/moviePlayer.swf?mxml=%2FflashMoviePlayerXML%2Ehtml%3FlistId%3D" + listId;     
    theURL = listId;
    
    features = "top=50,left=50,width=574,height=282,scrollbars=no,toolbar=no,location=no,status=no,menubar=no,directories=no,resizable=yes";
    flashWin = window.open("/playMovie.html?windowTitle=" + winTitle + "&url=" + theURL, "",features);  
    
    // commented out the code to fix the IE issue
    
    /*
    with(flashWin.document){
        open ('text/html');
        writeln('<html><head><title>'+winTitle+'</title></head><frameset rows="*" frameborder="0" border="0">');
        writeln('<frame src="'+theURL+'" scrolling="no" marginheight="0" marginwidth="0" noresize="noresize"/>');
        writeln ("TESTING ....");
        writeln('</frameset></html>');
        close ();
    }
    */
    if(!flashWin.opener){flashWin.opener = self;}
    flashWin.opener.opener = top;
    flashWin.focus(); 
}
<!--
function findObj(n, d) { //finds document objects
  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=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function showHideLayers() { //for showing and hiding layers
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=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 changeProp(objName,x,theProp,theValue) { //for nav cell color changing rollovers
  var obj = findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

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


function reloadPage(init) {  //reloads the window if Nav4 resized - Solves DHTML Netscape Problem
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

<!-- //THIS BLOCK OF JAVASCRIPT IS FOR JUMP SELECT MENUS...
var jumpMenuActive = false;
function jumpMenu(targ,selObj,restore){ 
  if(selObj.options[selObj.selectedIndex].value && !jumpMenuActive){
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    jumpMenuActive = true;
  }
  if (restore) selObj.selectedIndex=0;
}
var showPageActive = false;
function showPage(url){
	if(url && url!=0 ){
	    document.location = url;
        showPageActive = true;
    }
}
//-->

/* Create XMLHttpRequest and set response to global variable called reqXMLDoc */
/* url is the URL of XML doc */
/* reqFuncis the name of function (as a string) that will be called when the XML returns */
/* added by Wade Harrell 12/21/2004 1:17:49 PM */

var reqXMLDoc;
function loadXMLDoc(url,reqFunc) {
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        reqXMLDoc = new XMLHttpRequest();
        reqXMLDoc.onreadystatechange = eval(reqFunc);
        reqXMLDoc.open("GET", url, true);
        reqXMLDoc.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        reqXMLDoc = new ActiveXObject("MSXML2.XMLHTTP");
        if (reqXMLDoc) {
            reqXMLDoc.onreadystatechange = eval(reqFunc);
            reqXMLDoc.open("GET", url, true);
            reqXMLDoc.send();
        }
    }
}
/* Clear (remove all) form select options */
/* frmElmnt is a DOM reference to the select element */
/* optString is an otional String to place in the single remaining option of the cleared select */
/* added by Wade Harrell 12/21/2004 1:18:25 PM */
function resetOptions(frmElmnt,optString){
    frmElmnt.length = (document.all)? 0 : 1;
    frmElmnt.length = 0;
    tempOption = new Option();
    tempOption.text = (optString)? optString : '' ;
    tempOption.value = '' ;
    (document.all)? frmElmnt.add(tempOption,1) : frmElmnt[0] = tempOption;
}
/* Submit form when enter key is pressed while form element has focus */
/* USAGE: onkeypress="checkEnter(event,this.form);" */
/* added by Wade Harrell 12/21/2004 1:18:47 PM */
function checkEnter(e,theForm){ //e is event object passed from function invocation
    characterCode = (e && e.which)? e.which : event.keyCode;
    if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
        theForm.submit();
        return false;
    }else{
        return true;
    }
}
/*Fixes flash border issue in IE*/
function fixflash(containerID){
	var flashContainer = document.getElementById(containerID);
	var flashMovie = document.createElement("div");
	//this checks whether page has flash or not
	if(flashContainer)
	{
		flashMovie.innerHTML = flashContainer.innerHTML.replace(/</g, "<").replace(/>/g, ">");
		flashContainer.parentNode.insertBefore(flashMovie, flashContainer);
		flashContainer.parentNode.removeChild(flashContainer);
		flashMovie.setAttribute("id",containerID);
	}
}

/* START PRIMARY NAV FUNCTIONS */
var menuBar;
var Bdy;
var hideMenuTimeout = null;
function initGlobalNav(){
    Bdy = document.body;
    menuBar = document.getElementById("menuBar");
    if(menuBar)
    {
	    var bar = menuBar.getElementsByTagName("div");     
	    for(var i=0;i < bar.length;i++){
	        bar[i].onmouseover = new Function("ShowMenu('"+bar[i].id+"')");
	        if(bar[i].getAttribute("menu")){
	            var menu=document.getElementById(bar[i].getAttribute("menu"));
	            menu.style.visibility = "hidden";
	            menu.style.left = -1000;
	            menu.style.top = -1000;
	            var Items = menu.getElementsByTagName("div");
	            for(var j=0; j<Items.length; j++){
	                var menuItem = Items[j];
	                if(menuItem.getAttribute("menu")){ 
	                    FindSubMenu(menuItem.getAttribute("menu"));
	                }
	                menuItem.onmouseover = new Function("highlight('"+Items[j].id+"')");                  
	                if(navigator.userAgent.toLowerCase().indexOf('msie')!=-1){ 
	                // create an iframe to mask out form select elements under the drop down div
	                    menuItem.style.position = "relative";
	                }         
	            }         
	            if(navigator.userAgent.toLowerCase().indexOf('msie')!= -1){ 
	            // create an iframe to mask out form select elements under the drop down div
	                ieIFrame = document.createElement("IFRAME");
	                ieIFrame.setAttribute("src", "/images/spacer.gif");
	                ieIFrame.setAttribute("id", "gnLevelTwoIFrame");
	                ieIFrame.setAttribute("name", "gnLevelTwoIFrame");
	                ieIFrame.setAttribute("frameborder", "no");
	                ieIFrame.style.width = (menu.offsetWidth)+"px";
	                ieIFrame.style.height = (menu.offsetHeight-1)+"px";
	                menu.appendChild(ieIFrame);
	            }
	        }
	    }  
    }
    //fix flash issue
    //fixflash('flashId');
}
function FindSubMenu(subMenuId){
    var menu=document.getElementById(subMenuId);
    var Items = menu.getElementsByTagName("div");
    for(var j=0; j<Items.length; j++){
        if(navigator.userAgent.toLowerCase().indexOf('msie')==-1){//prevents moz/firefox flicker
            menu.style.display = "none";
        }
        menu.style.visibility = "hidden";
        menu.style.left = -1000;
        menu.style.top = -1000;
        var menuItem = Items[j];
        if(menuItem.getAttribute("menu")){
            FindSubMenu(menuItem.getAttribute("menu"));
        }
        menuItem.onmouseover = new Function("highlight('"+Items[j].id+"')");
        if(navigator.userAgent.toLowerCase().indexOf('msie')!=-1){ 
        // create an iframe to mask out form select elements under the drop down div
            menuItem.style.position = "relative";
        }         
    }  
    if(navigator.userAgent.toLowerCase().indexOf('msie')!=-1){ 
    // create an iframe to mask out form select elements under the drop down div
        ieIFrame = document.createElement("IFRAME");
        ieIFrame.setAttribute("src", "/images/spacer.gif");
        ieIFrame.setAttribute("id", "gnLevelTwoIFrame");
        ieIFrame.setAttribute("name", "gnLevelTwoIFrame");
        ieIFrame.setAttribute("frameborder", "no");
        ieIFrame.style.width = (menu.offsetWidth)+"px";
        ieIFrame.style.height = (menu.offsetHeight-1)+"px";
        menu.appendChild(ieIFrame);
    }
} 
function ShowMenu(objId){
    HideMenu(menuBar.id);
    var bar = document.getElementById(objId);
    bar.className="barOver";
    if(bar.getAttribute("menu")){
        var menu = document.getElementById(bar.getAttribute("menu"));
        menu.style.top = ((bar.getBoundingClientRect)?bar.getBoundingClientRect().top + bar.offsetHeight + Bdy.scrollTop - 2 : getAddativeOffsetTop(menuBar) + bar.offsetHeight + Bdy.scrollTop)+"px";
        menu.style.left = ((bar.getBoundingClientRect)?bar.getBoundingClientRect().left + Bdy.scrollLeft - 2 : getAddativeOffsetLeft(bar) + Bdy.scrollLeft + 6)+"px";
        menu.style.visibility = "visible";
        menu.style.display = "";
    }
    if(hideMenuTimeout){window.clearTimeout(hideMenuTimeout);}
    hideMenuTimeout = null;
    bar.onmouseout = new Function('hideMenuTimeout = window.setTimeout("HideMenu(menuBar.id)",100)');  
}
function highlight(objId){
    obj = document.getElementById(objId);
    var PElement = obj.parentNode;
    if(PElement.hasChildNodes() == true){  
        var Elements = PElement.getElementsByTagName("div");
        for(var i=0;i<Elements.length;i++){
            Elements[i].className = "menuItem";
        }
    } 
    ShowSubMenu(obj.id);
}
function HideMenu(objId){
    obj = document.getElementById(objId);
    if(obj.hasChildNodes()==true){  
        var child = obj.getElementsByTagName("div");
        for(var j =0;j<child.length;j++){
            if (child[j].className=="barOver"){
                child[j].className="Bar";
            }
            if(child[j].getAttribute("menu")){
                var childMenu = document.getElementById(child[j].getAttribute("menu"));
                childMenu.style.visibility = "hidden";
                if(childMenu.hasChildNodes()==true){
                    HideMenu(childMenu.id);
                }
                childMenu.style.left = -1000;
            }
        }
    }
}
function ShowSubMenu(objId){
    objShowSubMenu = document.getElementById(objId);
    PMenu = objShowSubMenu.parentNode;
    failSafeCounter = 0;
    while(PMenu.tagName.toLowerCase()!="div" && failSafeCounter < 20){
        PMenu = PMenu.parentNode;
        failSafeCounter++;
    }
    HideMenu(PMenu.id);
    if(objShowSubMenu.getAttribute("menu")){
        var menu = document.getElementById(objShowSubMenu.getAttribute("menu"));
        parentTable = objShowSubMenu.parentNode;
        failSafeCounter = 0;
        while(parentTable.tagName.toLowerCase()!="table" && failSafeCounter < 20){
            parentTable = parentTable.parentNode;
            failSafeCounter++;
        }          
        menu.style.top = ((objShowSubMenu.getBoundingClientRect)?objShowSubMenu.getBoundingClientRect().top + Bdy.scrollTop + 2 : 4 + getAddativeOffsetTop(objShowSubMenu) + Bdy.scrollTop)+"px";
        menu.style.left = ((parentTable.getBoundingClientRect)?parentTable.getBoundingClientRect().right + Bdy.scrollLeft - 2 : getAddativeOffsetLeft(objShowSubMenu) + objShowSubMenu.offsetWidth + Bdy.scrollLeft)+"px";
        menu.style.visibility = "visible";
        menu.style.display = "";
    }
    if(hideMenuTimeout){window.clearTimeout(hideMenuTimeout);}
    hideMenuTimeout = null;
    objShowSubMenu.onmouseout = new Function('hideMenuTimeout = window.setTimeout("HideMenu(menuBar.id)",100)');  
} 
function getAddativeOffsetTop(theAOTObj){
    retrInt = 0;
    retrInt += theAOTObj.offsetTop;
    if(theAOTObj.parentNode.tagName.toLowerCase()!="body" && (theAOTObj.parentNode.tagName.toLowerCase()!="div" || retrInt < 2)){
        retrInt += getAddativeOffsetTop(theAOTObj.parentNode);
    }
    return retrInt;
}
function getAddativeOffsetLeft(theAOLObj){
    retrInt = 0;
    retrInt += theAOLObj.offsetLeft;
    if(theAOLObj.parentNode.tagName.toLowerCase()!="body" && (theAOLObj.parentNode.tagName.toLowerCase()!="div" || retrInt < 2)){
        retrInt += getAddativeOffsetLeft(theAOLObj.parentNode);
    }
    return retrInt;
}
/* END PRIMARY NAV FUNCTIONS */

/* Clears all the elements in a form. NOTE: fields where elementType == 'hidden' are not cleared */
function clearForm(theForm) {
    for (var i = 0, j = theForm.elements.length; i < j; i++) {
        elementType = theForm.elements[i].type;
        if (elementType == 'password' || elementType == 'text' || elementType == 'textarea') {
            theForm.elements[i].value = "";
            if (theForm.elements[i].defaultValue) {
                theForm.elements[i].defaultValue = "";
            }
        }
        if (elementType == 'checkbox' || elementType == 'radio') {
            theForm.elements[i].checked = false;
            theForm.elements[i].defaultChecked = false;
        }
        if (elementType == 'select-one' || elementType == 'select-multiple') {
            for (var k = 0, m = theForm.elements[i].options.length; k < m; k++) {
                theForm.elements[i].options[k].selected = false; 
                theForm.elements[i].options[k].defaultSelected = false;
            }
        }
    }
    if (window.toggleLocalStep) {
        toggleLocalStep(0);
    }
    if (window.stateCountryCheck) {
        stateCountryCheck();
    }
}


function clearEditForm(theForm) {
    for (var i = 0, j = theForm.elements.length; i < j; i++) {
    if (theForm.elements[i].id == "productIdSel")
        {
        	continue;
        }
        elementType = theForm.elements[i].type;
        if (elementType == 'password' || elementType == 'text' || elementType == 'textarea') {
            theForm.elements[i].value = "";
            if (theForm.elements[i].defaultValue) {
                theForm.elements[i].defaultValue = "";
            }
        }
        if (elementType == 'checkbox' || elementType == 'radio') {
            theForm.elements[i].checked = false;
            theForm.elements[i].defaultChecked = false;
        }
        if (elementType == 'select-one' || elementType == 'select-multiple') {
            for (var k = 0, m = theForm.elements[i].options.length; k < m; k++) {
                theForm.elements[i].options[k].selected = false; 
                theForm.elements[i].options[k].defaultSelected = false;
            }
        }
    }
    if (window.toggleLocalStep) {
        toggleLocalStep(0);
    }
    if (window.stateCountryCheck) {
        stateCountryCheck();
    }
}




function printUrl(){
    var printUrl = location.href;
    if(printUrl.indexOf("?") >= 0){
        printUrl += "&print=print";
    }else{printUrl += "?print=print";}
    return printUrl;
}

// -->

