// JavaScript Document

//functions for cv display

function expandCV() {
	cv = document.getElementById("cvdropdown");
	if (cv.style.height == "") {
		cv.style.height = "20px"
	} else {
		hh = cv.style.height;
		hh = parseInt(hh);
		newH = hh+20;
		if (newH <= 500) {
			cv.style.height = newH + 'px';
		}
		if (newH > 500) {
			cv.style.height = '500px';
		}
		if (hh == 500) {
		clearInterval(showCV);
		}
	}
	
}

function cvOn() {
	
	showCV = setInterval(expandCV,80);
}

function shrinkCV() {
	cv = document.getElementById("cvdropdown");
	hh = cv.style.height;
	hh = parseInt(hh);
	newH = hh-20;
	if (newH >= 0) {
		cv.style.height = newH + 'px';
	}
	if (newH < 0) {
		cv.style.height = '0px';
	}
	if (hh == 0) {
		clearInterval(hideCV);
	}
}

function cvOff() {
	
	hideCV = setInterval(shrinkCV,80)
}
//eof cv functions -------

function clearInput(el,orig) {
		if (el.value == orig) {
			el.value = "";
		}
}

//gallery

function caption_on (cap) {
	document.getElementById('pic_caption').innerHTML = cap;
}