// WebImgPreload:
//
function WebImgPreload()
{
  var appVer=parseInt(navigator.appVersion);
  var isNC=false,isN6=false,isIE=false;
  if (document.all && appVer >= 4) isIE=true; else
    if (document.getElementById && appVer > 4) isN6=true; else
      if (document.layers && appVer >= 4) isNC=true;
  if (isNC||isN6||isIE)
  {
    if (document.images)
    {
      var imgName = HpbImgPreload.arguments[0];
      var cnt;
      swImg[imgName] = new Array;
      for (cnt = 1; cnt < HpbImgPreload.arguments.length; cnt++)
      {
        swImg[imgName][HpbImgPreload.arguments[cnt]] = new Image();
        swImg[imgName][HpbImgPreload.arguments[cnt]].src = HpbImgPreload.arguments[cnt];
      }
    }
  }
}
// WebImgFind:
//
function WebImgFind(doc, imgName)
{
  for (var i=0; i < doc.layers.length; i++)
  {
    var img = doc.layers[i].document.images[imgName];
    if (!img) img = HpbImgFind(doc.layers[i], imgName);
    if (img) return img;
  }
  return null;
}
// WebImgSwap:
//
function WebImgSwap(imgName, imgSrc)
{
  var appVer=parseInt(navigator.appVersion);
  var isNC=false,isN6=false,isIE=false;
  if (document.all && appVer >= 4) isIE=true; else
    if (document.getElementById && appVer > 4) isN6=true; else
      if (document.layers && appVer >= 4) isNC=true;
  if (isNC||isN6||isIE)
  {
    if (document.images)
    {
      var img = document.images[imgName];
      if (!img) img = HpbImgFind(document, imgName);
      if (img) img.src = imgSrc;
    }
  }
}
// WebImgInit:
//
function WebImgInit(imgName, imgSrc)
{
  var swImg; swImg=new Array;

  WebImgPreload('_WEB_ROLLOVER1', 'images/menu_top.gif', 'images/menu_top_2.gif');
  WebImgPreload('_WEB_ROLLOVER2', 'images/menu_news.gif', 'images/menu_news_2.gif');
  WebImgPreload('_WEB_ROLLOVER3', 'images/menu_profile.gif', 'images/menu_profile_2.gif');
  WebImgPreload('_WEB_ROLLOVER4', 'images/menu_schedule.gif', 'images/menu_schedule_2.gif');
  WebImgPreload('_WEB_ROLLOVER5', 'images/menu_gallery.gif', 'images/menu_gallery_2.gif');
  WebImgPreload('_WEB_ROLLOVER6', 'images/menu_links.gif', 'images/menu_links_2.gif');
  WebImgPreload('_WEB_ROLLOVER7', 'images/menu_contact.gif', 'images/menu_contact_2.gif');
  WebImgPreload('_WEB_ROLLOVER8', 'images/menu_help.gif', 'images/menu_help_2.gif');
}
// JavaScript Document
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_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_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 openPopupWin(url,width,height)
{
  var DW1;
  window.open(url,"_blank","toolbar=no,menuber=0,scrollbars=no,width=" + width + ",height=" + height);
}
// Make Copyright TAG:
function makeCopyrightTag(){
    // ”N‚ðŽæ“¾
    dd = new Date();
    yy = dd.getYear();
    if (yy < 2000) {
	    yy += 1900;
    }
    if (yy==2006) {
    	document.write("Copyright(C)2006 Radioboxx Allright reserved.");
    }else{
    	document.write("Copyright(C)2006-"+ yy + " radioboxx Allright reserved.");
    }
}
var contentVersion = 7;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if ( plugin ) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i])))
		continue;
		var PluginVersion = words[i]; 
	}
	var FlashCanPlay = PluginVersion >= contentVersion;
	
}else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write( '<SCR' + 'IPT LANGUAGE="VBScript"\>'+"\n");
	document.write( 'on error resume next '+"\n");
	document.write( 'FlashCanPlay = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & contentVersion)))' + "\n");
	document.write('<'+'/SCR' + 'IPT\>'+"\n");
}

function loadMovie(fname, wsize, hsize, lp, mn, dfont, qua, bgcolor, imgname) {
	if (FlashCanPlay) {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + wsize + '" height="' + hsize + '" id="index" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="movie" value="' + fname +'" />');
		document.write('<param name="loop" value="'+lp+'" />');
		document.write('<param name="menu" value="'+mn+'" />');
		document.write('<param name="devicefont" value="'+dfont+'" />');
		document.write('<param name="quality" value="'+qua+'" />');
		document.write('<param name="bgcolor" value="' + bgcolor + '" />');
		document.write('<embed src="' + fname +'" quality="'+qua+'" bgcolor="' + bgcolor + '" width="' + wsize + '" height="' + hsize + '" name="index" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	} else{
		document.write('<img src="'+imgname+'" width="' + wsize + '" height="' + hsize + '" border="0" alt="" name="" usemap="#error">');
	}

}
function OpenWin(URL,width,height){
	window.open(URL,"_blank","toolbar=no,location=no,status=no,menuber=no,scrollbars=no,width=" + width + ",height="+ height);
}

