/////////////////////////////////////////////////////
//                                                 //
//  SECTION 1: Animation                           //
//  ---------------------------------------------  //
//                                                 //
/////////////////////////////////////////////////////



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.0
  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 && document.getElementById) x=document.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 Checkitout2(){

//      Gets Browser and Version

        var appver = "null";
        var browser = navigator.appName;
        var version = navigator.appVersion;
        if ((browser == "Netscape")) version = navigator.appVersion.substring(0, 3);
        if ((browser == "Microsoft Internet Explorer")) version = navigator.appVersion.substring(22, 25);

//      Gives AppVersion (appver) for Detect Strings

        if ((browser == "Microsoft Internet Explorer") && (version >= 3)) appver = "ie3+";
        if ((browser == "Netscape") && (version >= 3)) appver = "ns3+";
        if ((browser == "Netscape") && (version < 3)) appver = "ns2";


       if ((appver == "ie3+")) {
                return 0;
        }  else {
                return 1;
                }
}




function PopoffWindow(DaURL, typeWindow) {

        var ItsTheWindow;
		if (Checkitout2())  {
        
			switch (typeWindow){
					case "Window450x600":
					   ItsTheWindow = window.open(DaURL,"register","status,height=450,width=600,resizable=no,toolbar=0");
					   break;
					case "Window600x450":
						ItsTheWindow = window.open(DaURL,"demoweb","status,height=450,width=600,resizable=no,toolbar=0");
						break;
					case "Window250x200":
						ItsTheWindow = window.open(DaURL,"demoweb","status,height=200,width=250,resizable=no,toolbar=0");
						break;	
					case "Window350x400":
						ItsTheWindow = window.open(DaURL,"demoweb",scrolling="no","nostatus,height=350,width=400,toolbar=0");
						break;	
					default:
						ItsTheWindow = window.open(DaURL,"800x600","status,height=600,width=800,resizable=no,toolbar=0");
						
			}
        } else {
			switch (typeWindow){
					case "Window450x600":
					    ItsTheWindow = window.open(DaURL,"register","status,height=450,width=600,resizable=no,toolbar=0");
					    break;
					case "Window600x450":
						ItsTheWindow = window.open(DaURL,"demoweb","status,height=450,width=600,resizable=no,toolbar=0");
						break;
					case "Window250x200":
						ItsTheWindow = window.open(DaURL,"demoweb","status,height=200,width=250,resizable=no,toolbar=0");
						break;	
					case "Window450x500":
						ItsTheWindow = window.open(DaURL,"demoweb",scrolling="no","status,height=350,width=400,resizable=no,toolbar=0");
						break;	
					default:
						ItsTheWindow = window.open(DaURL,"800x600","status,height=600,width=800,resizable=no,toolbar=0");
						
			}                        
			if (parseInt(navigator.appVersion) >= 3){
                ItsTheWindow.focus();
        }
        }

}


    function leapto(form) {
    var myindex=form.dest.selectedIndex
    window.location=(form.dest.options[myindex].value);
    }

function MM_showHideLayers() { //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers != null) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null) { //IE
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}


