<!--
function VertDelete(theURL,message) {
	if (window.confirm("Do you really want to delete:\n" + message )) {
		window.location.href=theURL;
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function domSwap(imgid,swapto){
	theImg=document.getElementById(imgid);
	theImg.setAttribute("src",swapto);
}

function domSwapBack(imgid,swapback){
	theImg=document.getElementById(imgid);
	theImg.setAttribute("src",swapback);
}


function GoogleSiteSearch(varname) {
	//googleform.output.value = "test";
}

/**********************************************************************\
*       The JavaScript code in this section was written by:            *
*                          Rahul Mittal                                *
*       Sophomore, Dept. of Astronomy, Villanova University            *
* Feel free to use the code below provided this header remains intact! *
*       Drop me e-mail at rasteroid@hotmail.com if you want, and       *
*             that way I can check out your homepage... :)             *
*      Corrected Y2K bug October 3, 2003 (JD 2452915) by Adric Riedel
\**********************************************************************/

function calculateJD(calendarDate) {
   cdDate = new Date(calendarDate)
   year = cdDate.getYear()          //added + 1900 10/03/2003
   if (year < 1000 ) {year+=1900}  // modified 10/03/2003
   //year = 1900+cdDate.getYear()
   month = cdDate.getMonth() + 1 //getMonth() returns 0-11
   day = cdDate.getDate()
   hour = cdDate.getHours()
   min = cdDate.getMinutes()
   sec = cdDate.getSeconds()
   univTime = hour+(min/60)+(sec/3600)
   
   if ((100*year+month-190002.5) >= 0) {sign = 1}
      else {sign = -1}
   with (Math) {
      part1 = 367 * year
      part2 = floor((7*(year+floor((month+9)/12)))/4)
      part3 = day+floor((275*month)/9)
      part4 = 1721013.5+(univTime/24)
      part5 = 0.5*sign
      jd = part1-part2+part3+part4-part5+0.5
   }
   return jd
}


/**********************\
* The following javascript code was written by angie@vertebrate.co.uk for use with Weblobe.			*
* Feel free to use but please place a link (without a nofollow attribute) to http://www.weblobe.net 	*
* and this comment should remain with the javascript.
\**********************/

function ajaxMe(theURL, theDiv, theSub) {
	document.getElementById(theDiv).innerHTML='';
	var loberequest = false;
	try {
	  loberequest = new XMLHttpRequest();
	} catch (trymicrosoft) {
	  try {
		loberequest = new ActiveXObject("Msxml2.XMLHTTP");
	  } catch (othermicrosoft) {
		try {
		  loberequest = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (failed) {
		  loberequest = false;
		}
	  }
	}

	var loberegexp = /\?/;
	var lobematch = loberegexp.exec(theURL);
	if (lobematch) {theURL += '&ajaxian=1';}
	else {theURL += '?ajaxian=1';}
	var done = 0;
	loberequest.open("GET", theURL, true);
	loberequest.send(null);
	loberequest.onreadystatechange = checkState;
	
   function checkState() {
      if (loberequest.readyState == 4) {
         if (loberequest.status == 200) {
            var result = loberequest.responseText;
            document.getElementById(theDiv).innerHTML=loberequest.responseText;
			document.getElementById(theDiv).style.display = "block";
			eval(theSub);
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   //alert('done is ' + done);
}


function divOff(theDiv) {
	//Effect.Fade(theDiv, { duration: 0.4 });
	document.getElementById(theDiv).style.display = "none";
	closePreview();
}

function CreateMask () {
	// Inspired by Moo.com who are too cool to be true.
	//oBody = document.getElementsByTagName("body").item(0);
	oMask = document.getElementById('mask');
	oMask.style.height = document.body.offsetHeight + 'px';
	oMask.style.width = document.body.parentNode.scrollWidth + 'px';
	oMask.style.display = "block";
	//alert('type1 ' + document.body.parentNode.offsetHeight + ' type2 ' + document.body.offsetHeight);
	//oBody.insertBefore(oMask, oBody.firstChild);
	//insertAfter(oBody, oMask, oBody.lastChild);
	//alert('mask height is ' + oMask.style.height);
}

function insertAfter(parent, newElement, referenceElement) {
	parent.insertBefore(newElement, referenceElement.nextSibling);
} 

function closePreview(){
	if (document.getElementById('mask'))	 {
		//oBody = document.getElementsByTagName("body").item(0);
		oMask = document.getElementById('mask'); //get('divMask');
		oMask.style.display = "none";
		//oBody.removeChild(oMask);
	}
}

function fadeUpImg(theImg,theLoaderMess) {
	document.getElementById(theImg).style.display = "none";
	document.getElementById(theImg).onload=function() {
		document.getElementById(theLoaderMess).style.display = "none";
		Effect.Appear(theImg, { duration: 0.4 });
	}
	//alert('imagewidth is ' + document.getElementById(theImg).width + ' the img height is ' + document.getElementById(theImg).height );
}


function loadImage(theURL, theDiv, theWidth) {
	document.getElementById(theDiv).style.display = "none";
	if (theWidth) {
		document.getElementById(theDiv).style.width = theWidth;
	}
	moveid(document.getElementById(theDiv),0);
	ajaxMe(theURL, theDiv, "fadeUpImg('gallimglarger','loadingimglarger')");
}

function GalleryloadImage(theURL, theDiv, theWidth) {
	CreateMask();
	document.getElementById(theDiv).style.display = "none";
	if (theWidth) {
		document.getElementById(theDiv).style.width = theWidth;
	}
	moveid(document.getElementById(theDiv),0);

	//var RefDiv = document.getElementById('content');
	//var calcH = document.defaultView.getComputedStyle(RefDiv, null).getPropertyValue("height");

	//alert('content height is ' + calcH);

	//alert('scrollheight is ' + document.body.parentNode.scrollHeight);
	ajaxMe(theURL, theDiv, "fadeUpImg('gallimggallery','loadinggall')");
}


function ArtworkloadImage(theURL, theDiv, theWidth) {
	CreateMask();
	document.getElementById(theDiv).style.display = "none";
	if (theWidth) {
		document.getElementById(theDiv).style.width = theWidth;
	}
	moveid(document.getElementById(theDiv),0);
	ajaxMe(theURL, theDiv, "fadeUpImg('gallimgzoom','loadingimgzoom')");
}


function swapAjaxImage(theURL, theDiv) {
	ajaxMe(theURL, theDiv, "fadeUpImg('gallimggallery','loadinggall')");
	//ajaxMe(theURL, theDiv);
}

ie4 = (document.all && !document.getElementById)? true : false;
ie5 = (document.all && document.getElementById)? true : false;
op5 = (navigator.userAgent.indexOf("Opera")>=0)? true : false;

function moveid(id,y){
if((ie4||ie5)&&!op5){
	var ty = (document.body.scrollTop)?document.body.scrollTop:document.documentElement.scrollTop;
	y=y+ty;
}else{
	y=y+pageYOffset;
}
  if (op5) {
	id.style.top=y;
  } else {
	id.style.top=y+'px';
  }
}


function vert_toggle(divid) {
	var currvisi = Element.getStyle(divid, 'display'); // from prototype lib
	if (currvisi == "none" || !currvisi) {
		document.getElementById(divid).style.display = "block";
	}
	if (currvisi == "block") {
		document.getElementById(divid).style.display = "none";
	}
}



//-->
