function popupImage(path,obj,e) {
	var d = window.document;
	if(path != "")
		d.getElementById('popupImage').innerHTML = '<img src="'+path+'" />'+obj.title;
	else
		d.getElementById('popupImage').innerHTML = obj.title;
	d.getElementById('popupImage').style.left = getMouseX(e)+10+"px";
	d.getElementById('popupImage').style.top = getMouseY(e)-30+"px";
	d.getElementById('popupImage').style.visibility = "visible";
}
function getMouseX(e){
	if(window.opera)
		return e.clientX
	else if(document.all)	 
		return document.body.scrollLeft+event.clientX
	else if(document.layers||document.getElementById)
		return e.pageX
}
function getMouseY(e){
	if(window.opera)	 
		return e.clientY
	else if(document.all)	 
		return document.body.scrollTop+event.clientY
	else if(document.layers||document.getElementById)
		return e.pageY
}
function popupImage_hide() {
	var d = window.document;
	d.getElementById('popupImage').style.visibility = "hidden";
}
function popupImage_init(){
	if(document.getElementsByTagName('BODY').length==0)
		document.write('<body>');
	
	var element = document.createElement('span');
	element.id = "popupImage";
	var objBody = document.getElementsByTagName("body").item(0);
	objBody.appendChild(element);
}
try{
	window.addEventListener("load",function(){popupImage_init();},false);
}
catch(e){
	window.attachEvent("onload",function(){popupImage_init();});
}

var slideshowObj = new Object();
slideshowObj.href = new Array();
slideshowObj.title = new Array();
slideshowObj.rel = new Array();
slideshowObj.current = 0;
slideshowObj.flag = false;
slideshowObj.intervalHN = null;
function startSlideShow(uri){
	slideshowObj.flag = true;
	slideshowObj.href = new Array();
	slideshowObj.title = new Array();
	slideshowObj.rel = new Array();
	var tagObjects = document.getElementsByTagName("a");
	var cnt = 0;
	for(i=0;i<tagObjects.length;i++) {
		if(tagObjects[i].className == "thickbox" && tagObjects[i].rel == thickboxExObj.currentImageGroup){
			slideshowObj.title.push(tagObjects[i].title);
			slideshowObj.href.push(tagObjects[i].href);
			slideshowObj.rel.push(tagObjects[i].rel);
			cnt++;
			if(uri == tagObjects[i].href)
				slideshowObj.current = cnt;
		}
	}
	//TB_show(slideshowObj.title[0],slideshowObj.href[0],slideshowObj.rel[0]);
	//slideshowObj.current++;
	Slideshow();
	slideshowObj.intervalHN = setInterval("Slideshow()",5000);
}
function stopSlideshow(){
	clearInterval(slideshowObj.intervalHN);
	slideshowObj.flag = false;
}
function Slideshow(){
	//TB_show(TB_NextCaption, TB_NextURL, imageGroup);
	//TB_remove();
	$("#TB_window").remove();
	$("body").append("<div id='TB_window'></div>");
	TB_show(slideshowObj.title[slideshowObj.current],slideshowObj.href[slideshowObj.current],slideshowObj.rel[slideshowObj.current]);
	slideshowObj.current++;
	if(slideshowObj.title[slideshowObj.current] == undefined)
		stopSlideshow();
}
