/*
 * default.js
 *
 * contains scripting for majestic-music.com
 *
 * history:
 *    17 Mar 08: file created - sjr
 *
 */

/*sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);*/


var openQuestion = "";     // open question number (if any)

function showQuestion( ID ) {
   if( openQuestion == "" ) {
      document.getElementById( "qa" + ID ).style.background = "transparent";
      document.getElementById(  "a" + ID ).style.display = "block";
      openQuestion = ID;
      return;
   }

   if( openQuestion == ID ) {
      if( document.getElementById( "a" + ID ).style.display == "block" ) {
         document.getElementById( "a" + ID ).style.display = "none";
         document.getElementById( "qa" + ID ).style.background = "transparent";
         openQustion = "";
      } else {
         document.getElementById( "a" + ID ).style.display = "block";
         document.getElementById( "qa" + ID ).style.background = "transparent";
         openQustion = ID;
      }
      return;
   }

   document.getElementById( "qa" + openQuestion ).style.background = "transparent";
   document.getElementById( "a" + openQuestion ).style.display = "none";

   document.getElementById( "a" + ID ).style.display = "block";
   document.getElementById( "qa" + ID ).style.background = "transparent";

   openQuestion = ID;

}


function popUp( strURL, strType, strHeight, strWidth ) {
   var strOptions = "";
   if( strType == "console" ) { strOptions = "resizable,scrollbars,height="+strHeight+",width="+strWidth; }
   if( strType == "fixed" ) {   strOptions = "status,height="+strHeight+",width="+strWidth; }
   if( strType == "elastic" ) { strOptions = "toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth; }
   window.open( strURL, 'newWin', strOptions );
}
