var tempX;
var tempY;
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;


var timer;

function show2(l, container){
	var obj = document.getElementById(container);
	for(n=0;n<obj.childNodes.length;n++){
		if(obj.childNodes[n].tagName && obj.childNodes[n].tagName.toUpperCase()=='IMG'){
			img=obj.childNodes[n]
			break;
		}
	}
	obj.style.display="block";
	img.src=l;
	obj.style.position="absolute";
	obj.style.zIndex=10;
	obj.style.left=(document.body.clientWidth)/2-100;
	obj.style.top=40;
}

function show(l, container){
	var obj = document.getElementById(container);
	for(n=0;n<obj.childNodes.length;n++){
		if(obj.childNodes[n].tagName && obj.childNodes[n].tagName.toUpperCase()=='IMG'){
			img=obj.childNodes[n]
			break;
		}
	}
	obj.style.display="block";
	img.src=l;
	obj.style.position="absolute";
	obj.style.zIndex=10;
	obj.style.left=(document.body.clientWidth)/2-300;
	obj.style.top=150;
}
function hide(id){
	clearTimeout(timer);
	if(document.getElementById)id=document.getElementById(id);
	else if(document.all)id=document.all[id];
	else if(document.layer)id=document.layers[id];
	id.style.display="none";
}

function popup(id, v){
	tempv = v;
	tempid=id;
	if(document.getElementById)id=document.getElementById(id);
	else if(document.all)id=document.all[id];
	else if(document.layer)id=document.layers[id];
	
	id.innerHTML= v;
	
	if(IE){
		
		id.style.top=tempY;
		id.style.left=tempX;
		id.style.display="";
	}
	else id.setAttribute("style", "width:350px;text-align:justify;position:absolute;top:"+tempY+";left:"+tempX+";z-index:100;display:block;border:2px solid #990000;background-color:#FFF;padding:3px 10px 3px 10px;");
	timer = setTimeout("popup(tempid, tempv)", "10");
}

function hidepopup(id){
	clearTimeout(timer);
	if(document.getElementById)id=document.getElementById(id);
	else if(document.all)id=document.all[id];
	else if(document.layer)id=document.layers[id];

	if(IE){
		id.style.display="none";
	}
	else{
		id.setAttribute("style", "position:absolute;left:"+tempX+";top:"+tempY+";display:none;");
	}
}

function getMouseXY(e) {
	try {
		if (IE) { // grab the x-y pos.s if browser is IE
			tempX = event.clientX + document.body.scrollLeft;
			tempY = event.clientY + document.body.scrollTop;
		} else {  // grab the x-y pos.s if browser is NS
			tempX = e.pageX;
			tempY = e.pageY;
		}
	} catch(e) {
		// the page might not be loaded yet
		tempX = 0;
		tempY = 0;
	}

	// catch possible negative values in NS4
	if (tempX < 0) tempX = 0;
	if (tempY < 0) tempY = 0;

	tempX = tempX + 10;
	tempY = tempY + 15;

	return true;
}



// -------------------RSVP Images (22080702) - HMakha ----------------//
var num=0;

imgArray = [
  ['/images/rsvp_july.png','July', 'July'],
  ['/images/rsvp_aug.png','August', 'August'],
  ['/images/rsvp_sep.png','September', 'September'],
  ['/images/rsvp_oct.png','October', 'October'],
  ['/images/rsvp_nov.png','November', 'November'],
  ['/images/rsvp_dec.png','December', 'December'],
]

function slideshow(slide_num) {
  document.getElementById('calendar').src=imgArray[slide_num][0];
  document.getElementById('calendar').alt=imgArray[slide_num][1];
}

function slideshowUp() {
  num++;
  num = num % imgArray.length;
  slideshow(num);
}

function slideshowBack() {
  num--;
  if (num < 0) {num=imgArray.length-1;}
  num = num % imgArray.length;
  slideshow(num);
}




