function addToFavorite(favTitle){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
  else window.alert('This function is supported only by IE 4.x browsers.\n If you are using a different browser,\n please press Ctrl+D (Netscape) or add this bookmark manually.');
}

function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display? "":"block";
}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display? "":"block";
}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display? "":"block";
}
}


var fadeimages=new Array()
fadeimages[0]=["_common/templates/default/images/pic-0.jpg", "", ""]
fadeimages[1]=["_common/templates/default/images/pic-1.jpg", "", ""]
fadeimages[2]=["_common/templates/default/images/pic-2.jpg", "", ""]

var faded_pic_width = "548"
var faded_pic_height = "438"
var fadebgcolor="transparent"

function mga_body_onload()
{
/*
 vscroller_init('featured'); //init the vertical scroller
 //init the content vertical scrollbar
 myScrollbar1 = new MyScrollBar( 'myScrollbar1', 'myScrollBar1TD', 'content_div', 'scrollup', 'scrolldown' );
 */
}

function popups( addr )
{
   window.open( addr , '',
   "status=no,toolbar=no,menubar=no,personalbar=no,width=600,height=760,left=20,top=40" +
                  ",scrollbars=no,resizable=no");
}

function cssGetValue( str )
{
  return new Number (str.replace('px', ''));
}

var debug_window;
function debug_write( msg ) {
if ( !debug_window)
 debug_window = window.open('','',"status=no,toolbar=no,menubar=no" +
                                  ",personalbar=no,width=600,height=760,left=20,top=40" +
                                  ",scrollbars=yes,resizable=yes");
debug_window.document.write( msg + '</br>');
}


function popup( adr, w, h ) {
    var dlg = window.open( adr, "send_mail",
                  "toolbar=no,menubar=no,personalbar=no,width="+w+",height="+h+",left=40,top=120" +
                  "scrollbars=no,resizable=no");
}

/* news marquee start*/

/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
var delayb4scroll=1000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''
function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}
function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
/* news marquee stop*/

function EvalSound(soundobj) {
  var thissound= eval("document."+soundobj);
  thissound.Play();
}

