/*
External.js

*/
var layerX = 0

function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=550,height=400,left = 462,top = 334');");
}
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=450,height=300,left = 462,top = 334');");
}
function popUpMsg(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=200,height=100,left = 462,top = 334');");
}
function popUpFlash(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=550,height=400,left = 162,top = 134');");
}
function popUpPhoto(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=680,height=520,left = 100,top = 50');");
}
function ShowLayer(x)  {
//getMatrix(x);
layerX = x;
 if (navigator.appName == 'Netscape') {
  document.layers["layer" + x].visibility = 'show';
    <!--  moveLayerToMouseLoc("matrix" + x, offsetH, offsetV);-->
 } else {
   document.all["layer" + x].style.visibility = "visible";
 //  myAlign(x)
   <!--  moveLayerToMouseLoc("matrix" + x, offsetH, offsetV);-->
   }
}
function HideLayer(x)  {

 if (navigator.appName == 'Netscape') {
   document.layers["layer" + x].visibility = 'hide';
   } else {
   document.all["layer" + x].style.visibility = "hidden";
   }
}


// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
	var layername = "layer" + layerX;
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft + 20;
    tempY = event.clientY + document.body.scrollTop + 20;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX + 20;
    tempY = e.pageY + 20;
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0};
  if (tempY < 0){tempY = 0};
  
  // if (tempX + parseInt(document.all["layer" + layerX].style.width) > document.body.clientWidth-150){tempX = document.body.clientWidth - parseInt(document.all["layer" + layerX].style.width)-150}
  //if (tempY + parseInt(document.all["layer" + layerX].style.height) > document.body.Height){tempY = document.body.Height - parseInt(document.all["layer" + layerX].style.height)}
//document.all["layer" + layerX].style.left = tempX + "px";
//document.all["layer" + layerX].style.top = tempY;
switch(layerX){
case 1: //{if (tempX + parseInt(document.all["layer1"].style.width) > document.body.clientWidth-150){tempX = document.body.clientWidth - parseInt(document.all["layer1"].style.width)-150}
//if (tempY + parseInt(document.all["layer1"].style.height) > document.body.Height){tempY = document.body.Height - parseInt(document.all["layer1"].style.height)}
{if (tempX + parseInt(document.all["layer1"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer1"].style.width)-15}
if (tempY + parseInt(document.all["layer1"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer1"].style.height) - 15}
document.all["layer1"].style.left = tempX + "px";
document.all["layer1"].style.top = tempY + "px";
break;}
case 2:
{if (tempX + parseInt(document.all["layer2"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer2"].style.width)-15}
if (tempY + parseInt(document.all["layer2"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer2"].style.height) - 15}
document.all["layer2"].style.left = tempX + "px";
document.all["layer2"].style.top = tempY + "px";
break;}
case 3:
{if (tempX + parseInt(document.all["layer3"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer3"].style.width)-15}
if (tempY + parseInt(document.all["layer3"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer3"].style.height) - 15}
document.all["layer3"].style.left = tempX + "px";
document.all["layer3"].style.top = tempY + "px";
break;}
case 4:
{if (tempX + parseInt(document.all["layer4"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer4"].style.width)-15}
if (tempY + parseInt(document.all["layer4"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer4"].style.height) - 15}
document.all["layer4"].style.left = tempX + "px";
document.all["layer4"].style.top = tempY + "px";
break;}
case 5:
{if (tempX + parseInt(document.all["layer5"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer5"].style.width)-15}
if (tempY + parseInt(document.all["layer5"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer5"].style.height) - 15}
document.all["layer5"].style.left = tempX + "px";
document.all["layer5"].style.top = tempY + "px";
break;}
case 6:
{if (tempX + parseInt(document.all["layer6"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer6"].style.width)-15}
if (tempY + parseInt(document.all["layer6"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer6"].style.height) - 15}
document.all["layer6"].style.left = tempX + "px";
document.all["layer6"].style.top = tempY + "px";
break;}
case 7:
{if (tempX + parseInt(document.all["layer7"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer7"].style.width)-15}
if (tempY + parseInt(document.all["layer7"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer7"].style.height) - 15}
document.all["layer7"].style.left = tempX + "px";
document.all["layer7"].style.top = tempY + "px";
break;}
case 8:
{if (tempX + parseInt(document.all["layer8"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer8"].style.width)-15}
if (tempY + parseInt(document.all["layer8"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer8"].style.height) - 15}
document.all["layer8"].style.left = tempX + "px";
document.all["layer8"].style.top = tempY + "px";
break;}
case 9:
{if (tempX + parseInt(document.all["layer9"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer9"].style.width)-15}
if (tempY + parseInt(document.all["layer9"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer9"].style.height) - 15}
document.all["layer9"].style.left = tempX + "px";
document.all["layer9"].style.top = tempY + "px";
break;}
case 10: 
{if (tempX + parseInt(document.all["layer10"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer10"].style.width)-15}
if (tempY + parseInt(document.all["layer10"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer10"].style.height) - 15}
document.all["layer10"].style.left = tempX + "px";
document.all["layer10"].style.top = tempY + "px";
break;}
case 11:
{if (tempX + parseInt(document.all["layer11"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer11"].style.width)-15}
if (tempY + parseInt(document.all["layer11"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer11"].style.height) - 15}
document.all["layer11"].style.left = tempX + "px";
document.all["layer11"].style.top = tempY + "px";
break;}
case 12:
{if (tempX + parseInt(document.all["layer12"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer12"].style.width)-15}
if (tempY + parseInt(document.all["layer12"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer12"].style.height) - 15}
document.all["layer12"].style.left = tempX + "px";
document.all["layer12"].style.top = tempY + "px";
break;}
case 13:
{if (tempX + parseInt(document.all["layer13"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer13"].style.width)-15}
if (tempY + parseInt(document.all["layer13"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer13"].style.height) - 15}
document.all["layer13"].style.left = tempX + "px";
document.all["layer13"].style.top = tempY + "px";
break;}
case 14:
{if (tempX + parseInt(document.all["layer14"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer14"].style.width)-15}
if (tempY + parseInt(document.all["layer14"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer14"].style.height) - 15}
document.all["layer14"].style.left = tempX + "px";
document.all["layer14"].style.top = tempY + "px";
break;}
case 15:
{if (tempX + parseInt(document.all["layer15"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer15"].style.width)-15}
if (tempY + parseInt(document.all["layer15"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer15"].style.height) - 15}
document.all["layer15"].style.left = tempX + "px";
document.all["layer15"].style.top = tempY + "px";
break;}
case 16:
{if (tempX + parseInt(document.all["layer16"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer16"].style.width)-15}
if (tempY + parseInt(document.all["layer16"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer16"].style.height) - 15}
document.all["layer16"].style.left = tempX + "px";
document.all["layer16"].style.top = tempY + "px";
break;}
case 17:
{if (tempX + parseInt(document.all["layer17"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer17"].style.width)-15}
if (tempY + parseInt(document.all["layer17"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer17"].style.height) - 15}
document.all["layer17"].style.left = tempX + "px";
document.all["layer17"].style.top = tempY + "px";
break;}
case 18:
{if (tempX + parseInt(document.all["layer18"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer18"].style.width)-15}
if (tempY + parseInt(document.all["layer18"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer18"].style.height) - 15}
document.all["layer18"].style.left = tempX + "px";
document.all["layer18"].style.top = tempY + "px";
break;}
case 19:
{if (tempX + parseInt(document.all["layer19"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer19"].style.width)-15}
if (tempY + parseInt(document.all["layer19"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer19"].style.height) - 15}
document.all["layer19"].style.left = tempX + "px";
document.all["layer19"].style.top = tempY + "px";
break;}
case 20:
{if (tempX + parseInt(document.all["layer20"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer20"].style.width)-15}
if (tempY + parseInt(document.all["layer20"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer20"].style.height) - 15}
document.all["layer20"].style.left = tempX + "px";
document.all["layer20"].style.top = tempY + "px";
break;}
case 21:
{if (tempX + parseInt(document.all["layer21"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer21"].style.width)-15}
if (tempY + parseInt(document.all["layer21"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer21"].style.height) - 15}
document.all["layer21"].style.left = tempX + "px";
document.all["layer21"].style.top = tempY + "px";
break;}
case 22:
{if (tempX + parseInt(document.all["layer22"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer22"].style.width)-15}
if (tempY + parseInt(document.all["layer22"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer22"].style.height) - 15}
document.all["layer22"].style.left = tempX + "px";
document.all["layer22"].style.top = tempY + "px";
break;}
case 23:
{if (tempX + parseInt(document.all["layer23"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer23"].style.width)-15}
if (tempY + parseInt(document.all["layer23"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer23"].style.height) - 15}
document.all["layer23"].style.left = tempX + "px";
document.all["layer23"].style.top = tempY + "px";
break;}
case 24:
{if (tempX + parseInt(document.all["layer24"].style.width) > document.body.clientWidth-15){tempX = document.body.clientWidth - parseInt(document.all["layer24"].style.width)-15}
if (tempY + parseInt(document.all["layer24"].style.height) > document.body.clientHeight + document.body.scrollTop){tempY = document.body.clientHeight + document.body.scrollTop - parseInt(document.all["layer24"].style.height) - 15}
document.all["layer24"].style.left = tempX + "px";
document.all["layer24"].style.top = tempY + "px";
break;}
}
// document.Show.MouseX.value = window.height;
 //document.Show.MouseY.value = document.body.scrollHeight;
 
 return true;
}
function chkres(){
	return 400;
}
// swap images
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];}
}





