// JavaScript Document

////////////// Start Change Visibility State Function //////////////
function showSlide(){
	var object = document.getElementById( 'slideshowDiv' );
	object.style.visibility = 'visible';
}

function hideSlide(){
	var object = document.getElementById( 'slideshowDiv' );
	object.style.visibility = 'hidden';
}
////////////// End Change Visibility State Function //////////////

/////////////// Start Dragable Div Functionality /////////////////
var object = null;
var cX =  0;
var cY = 0;

function initPage() {
	document.onmousedown = pickIt;
	document.onmousemove = dragIt;
	document.onmouseup = dropIt;
}

function pickIt(evt) { 
	var evt = (evt) ? evt : ((window.event) ? event : null);
	object = document.getElementById("slideshowDiv");
	if (object) { 
		object.style.zIndex = 100;
		cX = evt.clientX - object.offsetLeft;
		cY = evt.clientY - object.offsetTop;
		return;
	}
	else {
		object = null;
		return;
	}
}
function dragIt(evt) {
	evt = (evt) ? evt : ((window.event) ? event : null);
	if (object) {
		object.style.left = evt.clientX - cX + 'px';
		object.style.top = evt.clientY - cY + 'px';
		return false;
	}
}

function dropIt() {
	if (object) {	
		object.style.zIndex = 0;
		object = null;
		return false;
	}
}
/////////////// End Dragable Div Functionality /////////////////

///////////// Start Image Changing Function /////////////
function movepic(img_name,img_src) {
	document[img_name].src=img_src;
}
///////////// End Image Changing Function /////////////

