function clearText(thefield, fieldClass){
	if (thefield.defaultValue == thefield.value){
		thefield.value = "";
	}
	if(fieldClass != undefined) thefield.className = fieldClass;
}

function updateCarousel(id) {
	flashMovie = swfobject.getObjectById('carousel');
	flashMovie.updateFromJS(id);
	return true;
}

function openLightbox(href) {
	if(lightbox) {
		lightbox.show("", href+'&TB_iframe=true&height=700&width=700', 'lightbox');
		return false;
	}
   return true;
}

function openLightboxFromFlash(mediaitemId) {
// Note: on IE, due to a flash plugin bug, if a flash movie is hidden while having focus, all later externalInterface calls fail. So we unfocus it here.
	$(document.body).focus();
   openLightbox(wwwroot+'/index.php?mediaitemId='+parseInt(mediaitemId)+'&template=lightbox');
   return false;
}



