function setIMG(objId) {
	var num = Math.floor(Math.random()*3) + 1;
	document.getElementById(objId).style.backgroundImage = 'url(\'images/keyvisual' + num + '.jpg\')';
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function writeFlash( swf , width , height )
{
  var flashparam = "";
  if( location.search != "" ){
    var work_str = String( location );
    var work_array = work_str.split( "?" );
    var work_array = work_array[1].split( "&" );
    var work_array = work_array[0].split( "=" );
    flashparam = "v_name=" + work_array[0] + "&v_value=" + work_array[1];
  }
  
  var htm = ""
  htm+="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'"
  htm+="        codebase='http://download.macromedia.com/pub/shockwave/"
                    htm+="cabs/flash/swflash.cab'"
  htm+="        width   = " + width
  htm+="        height  = " + height + ">"
  htm+="<param  name    = movie value=" + swf + ">"
  htm+="<param  name    = quality value=high>"
  if( flashparam != "" ){
    htm+="<param  name  = flashvars value=\"" + flashparam + "\">"
  }
  htm+="<embed  src     = " + swf + " "
  htm+="        quality = high  "
  htm+="        width   = "+ width
  htm+="        height  = " + height
  htm+="        type    = 'application/x-shockwave-flash' "
  if( flashparam != "" ){
    htm+="      flashvars = '" + flashparam + "' "
  }
  htm+="        pluginspage='http://www.macromedia.com/go/getflashplayer'>"
  htm+="</embed>"
  htm+="</object>"
  
  document.write(htm)
}

var sWin;
function openWindow_center(wUrl,wName,wWidth,wHeight){
	sw = screen.availWidth;
	sh = screen.availHeight;
	wl = (sw-wWidth)/2;
	wt = (sh-wHeight)/2;
	wOption = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + wWidth + ",height=" + wHeight + ",left=" + wl + ",top=" + wt;
	sWin = window.open(wUrl+location.search,wName,wOption);
	sWin.focus();
	sWin.moveTo(wl,wt)
}
