function openAWindow( pageToLoad, winName, width, height, center){

xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 ) &&(center)){
 xposition = (screen.width - width) / 8;
 yposition = (screen.height - height) / 3;
}

args = "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=0,"
+ "scrollbars=0,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //NN Only
+ "screeny=" + yposition + "," //NN Only
+ "left=" + xposition + "," //IE Only
+ "top=" + yposition; //IE Only

window.open( pageToLoad, winName, args );

}



function openAWindow2( pageToLoad, winName, width, height, center){

xposition=0; yposition=0;
if ((parseInt(navigator.appVersion) >= 4 ) &&(center)){
 xposition = (screen.width - width) / 8;
 yposition = (screen.height - height) / 3;
}

args = "width=" + width + ","
+ "height=" + height + ","
+ "location=0,"
+ "menubar=0,"
+ "resizable=0,"
+ "scrollbars=1,"
+ "status=0,"
+ "titlebar=0,"
+ "toolbar=0,"
+ "hotkeys=0,"
+ "screenx=" + xposition + "," //NN Only
+ "screeny=" + yposition + "," //NN Only
+ "left=" + xposition + "," //IE Only
+ "top=" + yposition; //IE Only

window.open( pageToLoad, winName, args );

}



function definesize(param) {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
      }
    }
  }

if(param==1){  return myWidth;}
else{return myHeight;}
}



function lightboxon(fl,width,height,event,rt,title,author)
{
dd=document.getElementById("lightbox")
dd.style.width=width+2
dd.style.width=height+2
dd.innerHTML="<table border='0' cellpadding='0' cellspacing='1' bgcolor='#000000' width='"+(width+2)+"'  height="+(height+2)+"><tr valign='bottom'><td bgcolor='#FFFFFF' style='background-image: url("+fl+"); background-repeat: no-repeat;'><div class='hover_string'><p>"+title+"</p><span>"+author+"</span></div></td></tr></table>"
dd.style.visibility="visible"

//alert(document.body.scrollTop)
//alert(event.clientX+"-"+event.clientY)
//alert(definesize(1)+"-"+definesize(2))

if(definesize(1)-event.clientX-10-width>0)
{
param_left=event.clientX+10;
}
else
{
param_left=event.clientX-10-width;
}

if(definesize(2)-event.clientY-10-height>0)
{
param_top=event.clientY+document.body.scrollTop+10;
}
else
{
param_top=event.clientY+document.body.scrollTop-10-height;
}


p_top=param_top.toString()+"px";
p_left=param_left.toString()+"px";

dd.style.top=p_top
dd.style.left=p_left

}








function lightboxon2(fl,width,height,event,rt)
{
dd=document.getElementById("lightbox")
dd.style.width=width+2
dd.style.width=height+2
dd.innerHTML="<table border='0' cellpadding='0' cellspacing='1' bgcolor='#000000' width='"+(width+2)+"'  height="+(height+2)+"><tr><td bgcolor='#FFFFFF' style='background-image: url("+rt+"/images/loading.gif); background-repeat: no-repeat;'><OBJECT ID='MediaPlayer' WIDTH='"+width+"' HEIGHT='"+height+"' CLASSID='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject'><PARAM NAME='FileName' VALUE='"+fl+"'><PARAM name='ShowControls' VALUE='false'><param name='ShowStatusBar' value='false'><PARAM name='ShowDisplay' VALUE='false'><PARAM name='autostart' VALUE='true'><EMBED TYPE='application/x-mplayer2' SRC='"+fl+"' NAME='MediaPlayer' WIDTH='"+width+"' HEIGHT='"+height+"' ShowControls='0' ShowStatusBar='0' ShowDisplay='0' autostart='1'></EMBED></OBJECT></td></tr></table>"
dd.style.visibility="visible"



if(definesize(1)-event.clientX-10-width>0)
{
param_left=event.clientX+10;
}
else
{
param_left=event.clientX-10-width;
}

if(definesize(2)-event.clientY-10-height>0)
{
param_top=event.clientY+document.body.scrollTop+10;
}
else
{
param_top=event.clientY+document.body.scrollTop-10-height;
}


p_top=param_top.toString()+"px";
p_left=param_left.toString()+"px";

dd.style.top=p_top
dd.style.left=p_left
}





function lightboxon3(fl,width,height,event,rt)
{
dd=document.getElementById("lightbox")
dd.style.width=width+2
dd.style.width=height+2
dd.innerHTML="<table border='0' cellpadding='0' cellspacing='1' bgcolor='#000000' width='"+(width+2)+"'  height="+(height+2)+"><tr><td bgcolor='#FFFFFF' style='background-image: url("+rt+"/images/loading.gif); background-repeat: no-repeat;'><object classid='CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000'  style='width:"+width+"px;height:"+height+"px;' codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=8,0,0,0'><param name='movie' value='"+rt+"/images/movie.swf?url="+fl+"&autoplay=true&loop=true&controlbar=false&sound=true&swfborder=true' /><param name='quality' value='high' /><param name='scale' value='exactfit' /><param name='menu' value='true' /><param name='bgcolor' value='#FFFFFF' /><param name='video_url' value=' ' /><embed src='"+rt+"/images/movie.swf?url="+fl+"&autoplay=true&loop=true&controlbar=false&sound=true&swfborder=true' quality='high' scale='exactfit' menu='false' bgcolor='#FFFFFF' style='width:"+width+"px;height:"+height+"px;' swLiveConnect='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash'></embed></object></td></tr></table>"
dd.style.visibility="visible"



if(definesize(1)-event.clientX-10-width>0)
{
param_left=event.clientX+10;
}
else
{
param_left=event.clientX-10-width;
}

if(definesize(2)-event.clientY-10-height>0)
{
param_top=event.clientY+document.body.scrollTop+10;
}
else
{
param_top=event.clientY+document.body.scrollTop-10-height;
}


p_top=param_top.toString()+"px";
p_left=param_left.toString()+"px";

dd.style.top=p_top
dd.style.left=p_left
}








function lightboxon4(fl,width,height,event,rt)
{
dd=document.getElementById("lightbox")
dd.style.width=width+2
dd.style.width=height+2
dd.innerHTML="<table border='0' cellpadding='0' cellspacing='1' bgcolor='#000000' width='"+(width+2)+"'  height="+(height+2)+"><tr><td bgcolor='#FFFFFF' style='background-image: url("+rt+"/images/loading.gif); background-repeat: no-repeat;'><object type=\"application/x-shockwave-flash\" data=\""+rt+"/images/player_mp3_mini.swf\" width=\"200\" height=\"20\"><param name=\"movie\" value=\""+rt+"/images/player_mp3_mini.swf\" /><param name=\"bgcolor\" value=\"000000\" /><param name=\"FlashVars\" value=\"mp3="+fl+"&amp;autoplay=1\" /></object></td></tr></table>"
dd.style.visibility="visible"



if(definesize(1)-event.clientX-10-width>0)
{
param_left=event.clientX+10;
}
else
{
param_left=event.clientX-10-width;
}

if(definesize(2)-event.clientY-10-height>0)
{
param_top=event.clientY+document.body.scrollTop+10;
}
else
{
param_top=event.clientY+document.body.scrollTop-10-height;
}


p_top=param_top.toString()+"px";
p_left=param_left.toString()+"px";

dd.style.top=p_top
dd.style.left=p_left
}








function lightboxmove(width,height,event)
{
dd=document.getElementById("lightbox")

if(definesize(1)-event.clientX-10-width>0)
{
param_left=event.clientX+10;
}
else
{
param_left=event.clientX-10-width;
}


if(definesize(2)-event.clientY-10-height>0)
{
param_top=event.clientY+document.body.scrollTop+10;
}
else
{
param_top=event.clientY+document.body.scrollTop-10-height;
}



p_top=param_top.toString()+"px";
p_left=param_left.toString()+"px";

dd.style.top=p_top
dd.style.left=p_left

}

function lightboxoff()
{
dd=document.getElementById("lightbox")
dd.innerHTML="";
dd.style.visibility="hidden"
}





