<!-- 
//*-- COSMODEVA common functions --*//
// PRELOADING IMAGES
if (document.images) {
 pdfIcon_on =new Image();  pdfIcon_on.src =bas + "/Images/pdfIcon_On.gif"; 
 pdfIcon_off=new Image();  pdfIcon_off.src=bas + "/Images/pdfIcon_Off.gif"; 
 bullet_on =new Image();  bullet_on.src =bas + "/Images/bullet_On.gif"; 
 bullet_off=new Image();  bullet_off.src=bas + "/Images/bullet_Off.gif"; 
}
function pdfIconOver(i) { 
 if (document.images) document["pdfIconName"+i].src=pdfIcon_on.src;
}
function pdfIconOut(i) {
 if (document.images) document["pdfIconName"+i].src=pdfIcon_off.src;
}
function bulletOn(i) {
 if (document.images) document["bullet"+i].src=bullet_on.src;
}
function bulletOff(i) {
 if (document.images) document["bullet"+i].src=bullet_off.src;
}

function blendImage()
{
	var display = (imageIndex + 1) % src.length;
	if (loaded[display] && (loaded[display].complete || loaded[display].complete==null))
	{
		imageIndex=display
		document["Ad_Image"].filters.blendTrans.Apply();
		document["Ad_Image"].style.visibility = "visible";
		document["Ad_Image"].src = loaded[imageIndex].src;
		document["Ad_Image"].filters.blendTrans.Play();
	}
	display=(imageIndex + 1 ) % src.length
	loaded[display] = new Image;
	loaded[display].src = src[display];

	setTimeout("blendImage()",duration*1000);
}
function revealImage(iTrans)
{
	var display = (imageIndex + 1) % src.length;
	if (loaded[display] && (loaded[display].complete || loaded[display].complete==null))
	{
		imageIndex=display
		// iTrans = 5: reveal from up -> down
		// iTrans = 6: reveal from left -> right
		document["Ad_Image"].filters.Transition=iTrans;
		document["Ad_Image"].filters.revealTrans.Apply();
		document["Ad_Image"].style.visibility = "visible";
		document["Ad_Image"].src = loaded[imageIndex].src;
		document["Ad_Image"].filters.revealTrans.Play();
	}
	display=(imageIndex + 1 ) % src.length
	loaded[display] = new Image;
	loaded[display].src = src[display];

	setTimeout("revealImage()",duration*1000);
}
function showPicture()
{
//	location.href = '../preview.asp?img=' + url[imageIndex];
	openPopup('../preview.asp?img=' + url[imageIndex]);
}
function openPopup(url)
{
	var x=0;
	var y=0;

	newWindow = window.open(url,'popup','width='+(screen.availWidth/2)+',height='+(screen.availHeight/2)+',top='+y+',left='+x+', toolbar=0, location=0, status=0, menubar=0, scrollbars=yes, resizable=1');
	with(newWindow)
	{
		focus();
	}
}
//