﻿function vsignpopUp(url) {
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
self.name = "mainWin"; 
}
var aWindow;
function heclosed()
{
aWindow=null;
}
function openWin(URL){
if(navigator.appName=="Microsoft Internet Explorer")
{
aWindow =window.open(URL,"siteWindow","resizable=no,toolbar=0,width=420,height=560,status=0,scrollbars=0,menubar=0");
}
else
if(aWindow!=null)
{
aWindow.location = URL;
aWindow.focus();
}
else
{
aWindow = window.open(URL,"siteWindow","resizable=no,toolbar=0,width=420,height=540,status=0,scrollbars=0,menubar=0");
}
}
function openWinPssl(URL){
if(navigator.appName=="Microsoft Internet Explorer")
{
aWindow =window.open(URL,"siteWindow","toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=800,height=550");
}
else
if(aWindow!=null)
{
aWindow.location = URL;
aWindow.focus();
}
else
{
aWindow = window.open(URL,"siteWindow","toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=800,height=550");
}
}
function openChatWin(URL){
if(navigator.appName=="Microsoft Internet Explorer")
{
aWindow =window.open(URL,"siteWindow","resizable=no,toolbar=0,width=130,height=75,status=0,scrollbars=0,menubar=0");
}
else
if(aWindow!=null)
{
aWindow.location = URL;
aWindow.focus();
}
else
{
aWindow = window.open(URL,"siteWindow","resizable=no,toolbar=0,width=130,height=75,status=0,scrollbars=0,menubar=0");
}
}
function peaveyPopUp(url) {
sealWin=window.open(url,"win",'toolbar=1,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=780,height=600');
self.name = "mainWin"; 
}
function openItemPricing(itemno) {
window.open('/item/itempricing.aspx?itemno=' + itemno, 'myname', 'width=600,height=600');
}
function openGenericItemPricing() {
window.open("/item/itempricing.aspx", "myname", "height=600,width=700,scrollbars=yes");
}
function openFreeshipping() {
//var s = '/customerservice/shippingrestrictions.aspx';
var s='/item/itempricing.aspx';
window.open(s, 'myname', 'width=600,height=400,scrollbars=yes');
}
function openVcode() {
window.open("/MyAccount/VCode.aspx", "vcodewin", "height=350,width=350,scrollbars=yes");
}
function openVcodeW() {
window.open("/secure/VCode_wwbw.htm", "vcodewin", "height=350,width=350,scrollbars=yes");
}
function findCode() {
window.open("/secure/CodeFind.asp?doLink=1", "codefind", "height=445,width=500,scrollbars=yes"); 
}
function openEmailForPrice(id) {
window.open('/item/pricerequest.aspx?itemno=' + id + '&mode=1', 'myname', 'width=500,height=500');
}
function openCallForPrice(itemno) {
window.open("/item/pricerequest.aspx?itemno=" + itemno + "&mode=2", "callforpricewin", "width=600,height=500");
}
function getCookie(name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i,j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i==0) break;
}
return null;
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf(";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function openWUValueProp(){
window.open('/includes/westernunion/quick_pay.aspx', 'myWin', 'width=500,height=440');
}
function openMAP(){
window.open('/item/map.htm','map','width=500,height=100');
}
function openMAP(list){
window.open("/item/map.aspx?l=" + list +"",'map','width=600,height=120');
}
function openReturnPolicy(id) {
self.name = 'parentwindow';
window.open('/item/ReturnPolicy.aspx?status=' + id, 'myname', 'width=400,height=150');
}
function openProdAvail(po, availtype,date,showcart) {
if (date == null)
date = "";
date = date.replace(" ", "%20");
if (showcart == null)
showcart = 0;
window.open("/item/availability.aspx?itemno=" + po + "&availtype=" + availtype + "&d=" + date + "&c=" + showcart, "availwin", "width=480,height=260");
}
function openOutletDef(id,free){
window.open("/outlet/OutletDefinitions.aspx?free=" + free + "#" + id,'def','width=500,height=200,scrollbars=yes');
}
function openExtraImages(prodid) {
window.open('/item/extraimages.aspx?p=' + prodid,'myname','width=1050,height=800');
}
function openLargerImage(s, sizeid, zpic) {
var newid = sizeid;
switch (newid) {
case "1":
window.open('/item/expandedimage.aspx?t=1&img=' + escape(s) + "&zimg=" + escape(zpic), 'myname', 'width=650,height=710,resiable=yes');
break;
case "2":
window.open('/item/expandedimage.aspx?t=2&img=' + escape(s) + "&zimg=" + escape(zpic), 'myname2', 'width=1050,height=450,resiable=yes');
break;
case "3":
window.open('/item/expandedimage.aspx?t=3&img=' + escape(s) + "&zimg=" + escape(zpic), 'myname3', 'width=300,height=300,resiable=yes');
break;
default:
window.open('/item/expandedimage.aspx?t=1&img=' + escape(s) + "&zimg=" + escape(zpic), 'myname4', 'width=650,height=650,resiable=yes');
break;
}
}
function openFree(itemno){
window.open("/item/free.aspx?itemno=" + itemno,'free','width=500,height=200');
}
function openProdFiles(prodid,filetypeid,itemno){
window.open("/Item/ProdFiles.aspx?prodid=" + prodid + "&f=" + filetypeid + "&itemno=" + itemno,'download','width=500,height=400');
}
function openWarranty(itemno) {
window.open('/item/warranty.aspx?itemno=' + itemno, 'myname', 'width=600,height=200');
} 
function openGlossary(id) {
window.open("/content/Glossary.aspx?id=" + id,"glossary","width=400,height=200");
}
function openBrandStory(id){
window.open("/brand/brandstory.aspx?b=" + id,"win","width=545,height=400,scrollbars=yes");
}
function openExtendedWarranty(){
self.name = 'parentwindow';
window.open("/customerservice/extended.aspx?ispopup=1","win","width=700,height=400,scrollbars=yes");
}
function openFinanceLink(){
self.name = 'parentwindow';
//window.open("/customerservice/popupFinance.html","win","width=700,height=400,scrollbars=yes");
window.open("/customerservice/creditapp.aspx?ispopup=1","win","width=880,height=700,scrollbars=yes");
}
function showWhyNoFreeShip() {
window.open("/CustomerService/PopupWhyFS.html", "win", "width=600,height=400");
}
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;
if (typeof dropmenuobj!="undefined") {
hideMouseover(); 
}
}
function MM_topnavRestore() { //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_preload() {
this.MM_preloadImages('/images/header/MyMusicStore/topnavBandOrch_on.gif','/images/header/MyMusicStore/topnavPercussion_on.gif','/images/header/MyMusicStore/topnavGuitars_on.gif','/images/header/MyMusicStore/topnavBass_on.gif','/images/header/MyMusicStore/topnavKeyboards_on.gif','/images/header/MyMusicStore/topnavRecComp_on.gif','/images/header/MyMusicStore/topnavLiveSound_on.gif','/images/header/MyMusicStore/topnavDjLighting_on.gif','/images/header/MyMusicStore/topnavOutlet.gif');
}
//Contents for menu 1 Band and Orchestra
var menu1=new Array(
'<a class="deptItem" href="/Woodwinds-d2529.music">Woodwind</a>', 
'<a class="deptItem" href="/Brass-d476.music">Brass</a>',
'<a class="deptItem" href="/Marching-Band-d1548.music">Marching Band</a>',
'<a class="deptItem" href="/Classroom-Music-d634.music">Classroom Music</a>',
'<a class="deptItem" href="/Violins-d2513.music">Violins</a>',
'<a class="deptItem" href="/Violas-d2479.music">Violas</a>',
'<a class="deptItem" href="/Cellos-d2416.music">Cellos</a>',
'<a class="deptItem" href="/String-Basses-d2443.music">Upright Bass</a>'
)
//Contents for menu 2 Percussion
var menu2=new Array( 
'<a class="deptItem" href="/Drums-d1763.music">Drums </a>',
'<a class="deptItem" href="/Cymbals-d1730.music">Cymbals </a>',
'<a class="deptItem" href="/Electronic-Drums-d1797.music">Electronic Drums </a>',
'<a class="deptItem" href="/Concert-Percussion-d770.music">Concert Percussion </a>',
'<a class="deptItem" href="/Marching-Percussion-d1594.music">Marching Percussion </a>',
'<a class="deptItem" href="/Drum-Sticks-d1745.music">Drum Sticks </a>',
'<a class="deptItem" href="/Hardware-d1801.music">Hardware </a>',
'<a class="deptItem" href="/Heads--Pads--Muffling-d1822.music">Heads, Pads, Muffling </a>',
'<a class="deptItem" href="/Latin-Percussion-d1827.music">Latin Percussion </a>',
'<a class="deptItem" href="/World-Percussion-d1869.music">World Percussion </a>',
'<a class="deptItem" href="/Bags---Cases-d1718.music">Bags & Cases </a>',
'<a class="deptItem" href="/Mounting-Systems-d1844.music">Mounting Systems </a>',
'<a class="deptItem" href="/Percussion-Parts-d1855.music">Percussion Parts </a>',
'<a class="deptItem" href="/Percussion-Books---Videos-d1853.music">Percussion Books & Videos </a>',
'<a class="deptItem" href="/Percussion-Gifts---Apparel-d2766.music">Percussion Gifts & Apparel </a>'
)
//Contents for menu 3 Guitars
var menu3=new Array( 
'<a class="deptItem" href="/Electric-Guitars-d1074.music">Electric Guitars </a>',
'<a class="deptItem" href="/Acoustic-Guitars-d1016.music">Acoustic Guitars </a>',
'<a class="deptItem" href="/Other-Stringed-Instruments-d1084.music">Other Stringed Instruments </a>',
'<a class="deptItem" href="/Guitar-Amps-d2701.music">Guitar Amps </a>',
'<a class="deptItem" href="/Guitar-Pedals---Effects-d1119.music">Guitar Pedals & Effects </a>',
'<a class="deptItem" href="/Strings-d1161.music">Strings </a>',
'<a class="deptItem" href="/Cases---Gigbags-d1056.music">Cases & Gigbags </a>',
'<a class="deptItem" href="/Cables-d994.music">Cables </a>',
'<a class="deptItem" href="/Pickups---Preamps-d3061.music">Pickups & Preamps </a>',
'<a class="deptItem" href="/Guitar-Accessories-d1125.music">Guitar Accessories </a>',
'<a class="deptItem" href="/TAB--Books---Videos-d1197.music">TAB, Books & Videos</a>',
'<a class="deptItem" href="/Guitar-Gifts---Apparel-d2754.music">Guitar Gifts & Apparel </a>'
)
//Contents for menu 4 Bass
var menu4=new Array(
'<a class="deptItem" href="/Bass-Guitars-d2841.music">Bass Guitars </a>',
'<a class="deptItem" href="/Bass-Amps-d2804.music">Bass Amps </a>',
'<a class="deptItem" href="/Bass-Pedals---Effects-d3185.music">Bass Pedals & Effects </a>',
'<a class="deptItem" href="/Bass-Strings-d3187.music">Bass Strings </a>',
'<a class="deptItem" href="/Bass-Cases---Gigbags-d3194.music">Bass Cases & Gigbags </a>',
'<a class="deptItem" href="/Pickups---Preamps-d3199.music">Pickups & Preamps </a>',
'<a class="deptItem" href="/Cables-d3117.music">Cables </a>',
'<a class="deptItem" href="/Guitar-Accessories-d3140.music">Guitar Accessories </a>',
'<a class="deptItem" href="/Guitar-Gifts---Apparel-d3182.music">Guitar Gifts & Apparel </a>',
'<a class="deptItem" href="/Bass-TAB--Books---Videos-d3209.music">Bass TAB, Books & Videos</a>'
)
//Contents for menu 5 Keyboards
var menu5=new Array(
'<a class="deptItem" href="/Portable-Keyboards-d1324.music">Portable Keyboards </a>',
'<a class="deptItem" href="/Digital-Pianos---Organs-d1290.music">Digital Pianos & Organs </a>',
'<a class="deptItem" href="/Synthesizers---Workstations-d1360.music">Synthesizers & Workstations </a>',
'<a class="deptItem" href="/Sound-Modules-d3073.music">Sound Modules </a>',
'<a class="deptItem" href="/Drum-Machines-d1304.music">Drum Machines </a>',
'<a class="deptItem" href="/Production-Stations---Samplers-d1284.music">Production Stations & Samplers </a>',
'<a class="deptItem" href="/Keyboard-Controllers-d1318.music">Keyboard Controllers </a>',
'<a class="deptItem" href="/Keyboard-Amps-d1254.music">Keyboard Amps </a>',
'<a class="deptItem" href="/Keyboard-Accessories-d1307.music">Keyboard Accessories </a>',
'<a class="deptItem" href="/Keyboard-Books---Video-d3075.music">Keyboard Books & Video </a>',
'<a class="deptItem" href="/Gifts---Apparel-for-Keyboardist-d2757.music">Gifts & Apparel for Keyboardist </a>'
)
//Contents for menu 6 Recording & Comp
var menu6=new Array(
'<a class="deptItem" href="/Recorders-d1961.music">Recorders </a>',
'<a class="deptItem" href="/Mixers-d1945.music">Mixers </a>',
'<a class="deptItem" href="/Microphones-d1929.music">Microphones </a>',
'<a class="deptItem" href="/Studio-Monitors-d1985.music">Studio Monitors </a>',
'<a class="deptItem" href="/Power-Amps-d1954.music">Power Amps </a>',
'<a class="deptItem" href="/Signal-Processors-d1975.music">Signal Processors </a>',
'<a class="deptItem" href="/Racks-d1957.music">Racks </a>',
'<a class="deptItem" href="/Headphones-d1916.music">Headphones </a>',
'<a class="deptItem" href="/Cables-d1882.music">Cables </a>',
'<a class="deptItem" href="/Blank-Media-d1877.music">Blank Media </a>',
'<a class="deptItem" href="/Interface-Hardware-d1922.music">Interface Hardware </a>',
'<a class="deptItem" href="/Multitrack-Recording-Software-d1927.music">Multitrack Recording Software </a>',
'<a class="deptItem" href="/Educational-d2778.music">Educational </a>',
'<a class="deptItem" href="/Jam---Accompaniment-d2784.music">Jam & Accompaniment </a>',
'<a class="deptItem" href="/Notation---Scoring-d2786.music">Notation & Scoring </a>',
'<a class="deptItem" href="/Remix---Looping-d2789.music">Remix / Looping </a>',
'<a class="deptItem" href="/Sample---Loop-CDs-d2791.music">Sample & Loop CDs </a>',
'<a class="deptItem" href="/Sampling-d2793.music">Sampling </a>',
'<a class="deptItem" href="/Software-Effects-d2795.music">Software Effects </a>',
'<a class="deptItem" href="/Virtual-Instruments-d2797.music">Virtual Instruments </a>'
)
//Contents for menu 7 Live Sound
var menu7=new Array(
'<a class="deptItem" href="/Mixers-d1500.music">Mixers </a>',
'<a class="deptItem" href="/Microphones-d1477.music">Microphones </a>',
'<a class="deptItem" href="/PA-Systems-d1509.music">PA Systems </a>',
'<a class="deptItem" href="/Live-Sound-Speakers-d1426.music">Live Sound Speakers </a>',
'<a class="deptItem" href="/Power-Amps-d1514.music">Power Amps </a>',
'<a class="deptItem" href="/Signal-Processors-d1538.music">Signal Processors </a>',
'<a class="deptItem" href="/Wireless-Systems-d1529.music">Wireless Systems </a>',
'<a class="deptItem" href="/Microphone-Preamps-d1475.music">Microphone Preamps </a>',
'<a class="deptItem" href="/Personal-Monitor-Systems-d1511.music">Personal Monitor Systems </a>',
'<a class="deptItem" href="/Racks-d1520.music">Racks </a>',
'<a class="deptItem" href="/Power-Conditioners---Converters-d1517.music">Power Conditioners & Converters </a>',
'<a class="deptItem" href="/Cables-d1370.music">Cables </a>',
'<a class="deptItem" href="/Microphone-Accessories-d1470.music">Microphone Accessories </a>',
'<a class="deptItem" href="/Speaker-Accessories-d1524.music">Speaker Accessories </a>',
'<a class="deptItem" href="/Mixer-Accessories-d1493.music">Mixer Accessories </a>'
)
//Contents for menu 8 DJ & Lighting
var menu8=new Array(
'<a class="deptItem" href="/DJ-Mixers-d890.music">DJ Mixers</a>',
'<a class="deptItem" href="/CD--MP3-DVD-Players---Recorders-d877.music">CD /MP3/DVD Players & Recorders </a>',
'<a class="deptItem" href="/Turntables-d915.music">Turntables </a>',
'<a class="deptItem" href="/Cartridges-d866.music">Cartridges </a>',
'<a class="deptItem" href="/DJ-Effects-d885.music">DJ Effects </a>',
'<a class="deptItem" href="/Production-Stations---Samplers-d913.music">Production Stations & Samplers </a>',
'<a class="deptItem" href="/Lighting-d899.music">Lighting </a>',
'<a class="deptItem" href="/Headphones-d860.music">Headphones </a>',
'<a class="deptItem" href="/DJ-Furniture-d887.music">DJ Furniture </a>',
'<a class="deptItem" href="/Power-Amps-d987.music">Power Amps </a>',
'<a class="deptItem" href="/Power-Conditioners---Converters-d990.music">Power Conditioners & Converters </a>',
'<a class="deptItem" href="/Live-Sound-Speakers-d924.music">Live Sound Speakers </a>',
'<a class="deptItem" href="/Personal-Monitor-Systems-d984.music">Personal Monitor Systems </a>',
'<a class="deptItem" href="/Microphones-d968.music">Microphones </a>',
'<a class="deptItem" href="/Cases---Racks-d871.music">Cases & Racks </a>',
'<a class="deptItem" href="/Cables-d3029.music">Cables </a>'
)
var menu9=new Array('');
var menuwidth='100px' //default menu width
var menubgcolor='#FFFDF1' //menu bgcolor
var appearDelay=300 //menu disappear speed onMouseout (in miliseconds)
var disappeardelay=50 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
var isOn = true; 
/////No further editting needed
var ie4=document.all
var ns6=document.getElementById&&!document.all
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6) {
dropmenuobj.style.left=dropmenuobj.style.top=-500;
}
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") {
showTimer = setTimeout("showNow()",appearDelay);
}
else if (e.type=="click") {
this.visibility="hidden"
}
}
function setFlag(state) {
isOn = state; 
}
function showNow() {
if(isOn) {
if(!ns6) {
drawIframe(); 
}
dropmenuobj.style.visibility="visible"
clearTimeout(showTimer);
}
}
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge") {
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset;
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18;
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) { //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight;
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) {//up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge;
}
}
}
return edgeoffset
}
function populatemenu(what){
if (ie4||ns6) {
dropmenuobj.innerHTML= "<div class=\"dropItem\">" + what.join("") + "</div>"
}
}
function dropdownmenu(obj, e, menucontents, menuwidth, swap1, swap2, swap3){
hidemenu();
isOn = true;
MM_swapImage(swap1, swap2, swap3); // executes mouseovers
if (window.event) { event.cancelBubble=true; }
else if (e.stopPropagation) { e.stopPropagation() }
clearhidemenu();
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents);
if ((ie4||ns6) && (menucontents[0] != "none")) {
if (swap1 != "topnavOutlet") {
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
}
return clickreturnvalue();
}
function clickreturnvalue(){
if (ie4||ns6) { return false }
else return true
}
function contains_ns6(a, b) {
while (b.parentNode) {
if ((b = b.parentNode) == a) {
return true;
return false;
}
}
}
function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement)) {
delayhidemenu();
}
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget)) {
delayhidemenu();
}
}
// sets dropdown visibility to hidden 
function hideMouseover() {
if (dropmenuobj.style.visibility="hidden" || !isOn) {
MM_topnavRestore();
iframe = getObj('iMask');
iframe.style.visibility="hidden";
}
}
// sets dropdown div visiibility to hidden
function hidemenu(e){
if (typeof dropmenuobj!="undefined") {
hideMouseover();
if (ie4||ns6) {
dropmenuobj.style.visibility="hidden";
}
}
}
// just triggers hidemenu() with a delay
function delayhidemenu(){
if (ie4||ns6) {
if (dropmenuobj.style.visibility != "visible") {
hidemenu();
}
else {
delayhide=setTimeout("hidemenu()",disappeardelay);
}
}
}
function clearhidemenu(){
if (typeof delayhide!="undefined") {
clearTimeout(delayhide);
}
}
if (hidemenu_onclick=="yes")
document.onclick=hidemenu
function init() {
if (!document.getElementById) return
var imgOriginSrc;
var imgTemp = new Array();
var imgarr = document.getElementsByTagName('img');
for (var i = 0; i < imgarr.length; i++) {
if (imgarr[i].getAttribute('hsrc')) {
imgTemp[i] = new Image();
imgTemp[i].src = imgarr[i].getAttribute('hsrc');
imgarr[i].onmouseover = function() {
imgOriginSrc = this.getAttribute('src');
this.setAttribute('src',this.getAttribute('hsrc'))
}
imgarr[i].onmouseout = function() {
this.setAttribute('src',imgOriginSrc)
}
}
}
}
onload=init;
//return [object]
function getObj(theId) {
if (document.getElementById) {
theObj = document.getElementById(theId); 
} else if (document.all) { 
theObj = document.all[theId];
}
return theObj;
}
// create an iframe if iframe or using as backdrop
function drawIframe() {
var iframe = getObj('iMask');
var dropArea = getObj('dropmenudiv');
iframe.style.visibility = 'visible';
document.body.insertBefore(iframe);
iframe.style.zIndex = 0;
iframe.style.top = dropArea.style.top;
iframe.style.left = dropArea.style.left;
iframe.style.width = dropArea.style.width;
iframe.style.height = dropArea.offsetHeight;
iframe.style.display='';
//window.alert(dropArea.style.height);
}
