
nav_home = new Image();
nav_home.src = "images/nav_home.gif";
nav_home_h = new Image();
nav_home_h.src = "images/nav_home_over.gif";

nav_agenda = new Image();
nav_agenda.src = "images/nav_agenda.gif";
nav_agenda_h = new Image();
nav_agenda_h.src = "images/nav_agenda_over.gif";

nav_keynotes = new Image();
nav_keynotes.src = "images/nav_keynotes.gif";
nav_keynotes_h = new Image();
nav_keynotes_h.src = "images/nav_keynotes_over.gif";

nav_panels = new Image();
nav_panels.src = "images/nav_panels.gif";
nav_panels_h = new Image();
nav_panels_h.src = "images/nav_panels_over.gif";

nav_registration = new Image();
nav_registration.src = "images/nav_registration.gif";
nav_registration_h = new Image();
nav_registration_h.src = "images/nav_registration_over.gif";

nav_sponsors = new Image();
nav_sponsors.src = "images/nav_sponsors.gif";
nav_sponsors_h = new Image();
nav_sponsors_h.src = "images/nav_sponsors_over.gif";

nav_arrow = new Image();
nav_arrow.src = "images/agenda/arrow.gif";
nav_arrow_h = new Image();
nav_arrow_h.src = "images/agenda/arrow_over.gif";

nav_back = new Image();
nav_back.src = "images/bio/backarrows.gif";
nav_back_h = new Image();
nav_back_h.src = "images/bio/backarrows_over.gif";

function picex(no,object) {
 window.document.images[no].src = object.src;
}

function openEvent(_id) {
	var _url = "detail.php?id="+_id;
	window.open(_url,"detailWin","menubar=no,scrollbars=yes,resizable=no,width=517,height=400,left=0,top=0");
}

function directionWin(url) {
	window.open(url,"win","menubar=no,scrollbars=yes,resizable=no,width=400,height=200,left=200,top=200");
}

function setPos()	{
	//var x = (screen.width - screen.width/2) - 200;
	//var y = (screen.height - screen.height/2) - 100;
	//self.moveTo(x,y);
	self.focus();
}

/* --- contact page --- */
function sf(){document.form1.Field3.focus();}

function validEmail(email) {
	invalidChars = " /:,;";
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i);
		if (email.indexOf(badChar,0) > -1) {
			return false;
		}
	}
	atPos = email.indexOf("@",1);
	if (atPos == -1) {
		return false;
	}
	if (email.indexOf("@",atPos+1) != -1) {
		return false;
	}
	periodPos = email.indexOf(".",atPos);
	if (periodPos == -1) {
		return false;
	}
	if (periodPos+3 > email.length)	{
		return false;
	}
	return true;
}

function validate(theForm) {
	theForm.Field3.className = "good";
	theForm.Field4.className = "good";
	theForm.Field5.className = "good";
	theForm.Field6.className = "good";
	theForm.Field7.className = "good";
	theForm.Field8.className = "good";
	theForm.Field9.className = "good";
	theForm.Field10.className = "good";
	theForm.Field11.className = "good";
	theForm.Field12.className = "good";
	theForm.Field18617.className = "good";
	theForm.Field18618.className = "good";
	theForm.Field18619.className = "good";
	
	if (theForm.Field3.value == "")
	{
	theForm.Field3.className = "bad";
	alert("Please enter a value in the selected field.");
	theForm.Field3.focus();
	return (false);
	}
	
	if (theForm.Field4.value == "")
	{
	theForm.Field4.className = "bad";
	alert("Please enter a value in the selected field.");
	theForm.Field4.focus();
	return (false);
	}
	
	if (theForm.Field5.selectedIndex == 0)
	{
	theForm.Field5.className = "bad";
	alert("Please select a valid option.");
	theForm.Field5.focus();
	return (false);
	}
	
	if (theForm.Field6.value == "")
	{
	theForm.Field6.className = "bad";
	alert("Please enter a value in the selected field.");
	theForm.Field6.focus();
	return (false);
	}
	
	if (theForm.Field7.selectedIndex == 0)
	{
	theForm.Field7.className = "bad";
	alert("Please select a valid option.");
	theForm.Field7.focus();
	return (false);
	}
	
	if (theForm.Field8.value == "")
	{
	theForm.Field8.className = "bad";
	alert("Please enter a value in the selected field.");
	theForm.Field8.focus();
	return (false);
	}
	
	if (theForm.Field9.value == "")
	{
	theForm.Field9.className = "bad";
	alert("Please enter a value in the selected field.");
	theForm.Field9.focus();
	return (false);
	}
	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-@._ ";
	var checkStr = theForm.Field9.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
	ch = checkStr.charAt(i);
	for (j = 0;  j < checkOK.length;  j++)
	if (ch == checkOK.charAt(j))
	break;
	if (j == checkOK.length)
	{
	allValid = false;
	break;
	}
	}
	if (!allValid)
	{
	theForm.Field9.className = "bad";
	alert("You can only use normal characters and numbers in your email address.");
	theForm.Field9.focus();
	return (false);
	}
	
	if (!validEmail(theForm.Field9.value))
	if ((theForm.Field9.value != "") && (!validEmail(theForm.Field9.value)))
	{
	theForm.Field9.className = "bad";
	alert("You have entered an invalid email address.");
	theForm.Field9.focus();
	return (false);
	}
	if (theForm.Field10.value == "")
	{
	theForm.Field10.className = "bad";
	alert("Please enter a value in the selected field.");
	theForm.Field10.focus();
	return (false);
	}
	
	if (theForm.Field12.value == "")
	{
	theForm.Field12.className = "bad";
	alert("Please enter a value in the selected field.");
	theForm.Field12.focus();
	return (false);
	}
	
	if (theForm.Field18618.value == "")
	{
	theForm.Field18618.className = "bad";
	alert("Please enter a value in the selected field.");
	theForm.Field18618.focus();
	return (false);
	}
	
	if (theForm.Field18619.selectedIndex == 0)
	{
	theForm.Field18619.className = "bad";
	alert("Please select a valid option.");
	theForm.Field18619.focus();
	return (false);
	}
	
	return (true);
}

/* --- links page --- */
function SwapImageOver( Area ) {
	if (Area != "") {
		switch(Area) {
		case 'Europe' :
			document.imap.src = 'images/links/world_01-europe_over.gif';
			break;
		case 'North America' :
			document.imap.src = 'images/links/world_01-north_america_over.gif'
			break;
		case 'South America' :
			document.imap.src = 'images/links/world_01-south_america_over.gif';
			break;
		case 'Africa' :
			document.imap.src = 'images/links/world_01-africa_over.gif';
			break;
		case 'Asia' :
			document.imap.src = 'images/links/world_01-asia_over.gif';
			break;
		case 'Australasia' :
			document.imap.src = 'images/links/world_01-australia_over.gif';
			break;	
		default :
			document.imap.src = 'images/links/world_01.gif';
		}
	}
}

function MM_preloadImages() { //v2.0
  if (document.images) {
    var imgFiles = MM_preloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function preloadMapPics() {
	MM_preloadImages('images/links/world_01-north_america_over.gif','images/links/world_01-south_america_over.gif','images/links/world_01-africa_over.gif','images/links/world_01-asia_over.gif','images/links/world_01-australia_over.gif');
}

/* --- events --- */
function openpayment(popurl){
	winpops=window.open(popurl,"Payment","width=500,height=600,scrollbars,");
	winpops.focus();
}

function openpayment2(popurl){
	winpops=window.open(popurl,"Payment","width=700,height=600,scrollbars,");
	winpops.focus();
}