function hideDiv() {
	setPopupYoutubeId('');
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('hideshow').style.visibility = 'hidden'; 
	} else { 
		if (document.layers) { // Netscape 4 
			document.hideshow.visibility = 'hidden'; 
		} else { // IE 4 
			document.all.hideshow.style.visibility = 'hidden'; 
		} 
	} 
}
	
function showDiv(newTitle,newId) {
	setPopupTitle(newTitle);
	setPopupYoutubeId(newId);
	
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('hideshow').style.visibility = 'visible'; 
	} else { 
		if (document.layers) { // Netscape 4 
			document.hideshow.visibility = 'visible';
		} else { // IE 4 
			document.all.hideshow.style.visibility = 'visible';
		}
	}
	return false;
}	

function showDivPic(newTitle,image) {
	setPopupTitle(newTitle);
	setPopupImage(image);
	
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('hideshow').style.visibility = 'visible'; 
	} else { 
		if (document.layers) { // Netscape 4 
			document.hideshow.visibility = 'visible';
		} else { // IE 4 
			document.all.hideshow.style.visibility = 'visible';
		}
	}
	return false;
}

function setPopupTitle(newTitle){
	document.getElementById('popuptitle').innerHTML=newTitle;
}

function setPopupYoutubeId(newId){
	document.getElementById('popupinner').innerHTML=
		 "\n<object width='425' height='344'>"
		+"\n<param name='movie' value='http://www.youtube.com/v/"+newId+"&amp;hl=en'></param>"
		+"\n<param name='allowFullScreen' value='true'></param>"
		+"\n<param name='allowscriptaccess' value='always'></param>"
		+"\n<embed src='http://www.youtube.com/v/"+newId+"&amp;hl=en' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='425' height='344'></embed>"
		+"\n</object>";
}
function setPopupImage(image){
	document.getElementById('popupinner').innerHTML="<img src='"+image+"' alt='IMAGE NOT FOUND' title='"+image+"'>";
}
function updateImages(prefix){
	var img_small = document.getElementById('img_small').value;
	var img_large = document.getElementById('img_large').value;
	
	document.getElementById('smallimgdiv').innerHTML="<img src='"+prefix+img_small+"' alt='IMAGE NOT FOUND' title='"+img_small+"'>";
	document.getElementById('largeimgdiv').innerHTML="<img src='"+prefix+img_large+"' alt='IMAGE NOT FOUND' title='"+img_large+"'>";
	
}

function updateThumbnail(prefix){
	var thumbnail = document.getElementById('thumbnail').value;
	document.getElementById('thumbnailimgdiv').innerHTML="<img src='"+prefix+thumbnail+"' alt='IMAGE NOT FOUND' title='"+thumbnail+"'>";
}