/******************************************************************************
*** OPEN **********************************************************************
******************************************************************************/

	function OpenBlogImage(link, image, width, height)
	{
		image = 'http://www.garoo.net/photos/?img=' + image;
		window.open(image, '_blank', 'width=' + (width+24+24) + ',height=' + (height+24+24) + ',resizable=yes,scrollbars=yes');
		link.href = 'javascript:void(0);';
	}
	function OpenBlogsnapImage(link, image, width, height)
	{
		image = 'http://www.garoo.net/blogsnap/img/' + image;
		window.open(image, '_blank', 'width=' + (width/*+24*/) + ',height=' + (height/*+24*/) + ',resizable=yes,scrollbars=no');
		link.href = 'javascript:void(0);';
	}
	function OpenGalleryImage(link, image, width, height)
	{
		window.open(image, '_blank', 'width=' + (width/*+24*/) + ',height=' + (height/*+124*/) + ',resizable=yes,scrollbars=no');
		link.href = 'javascript:void(0);';
	}
	function OpenTagboard(link)
	{
		window.open('http://www.garoo.net/tagboard/', '_blank', 'width=550,height=400,resizable=yes');
		link.href = 'javascript:void(0);';
	}

/******************************************************************************
*** VOID **********************************************************************
******************************************************************************/

	var voidLink, voidLinkHref, voidLinkTarget;
	function VoidLink(a)
	{
		if(!a) return;
		voidLink = a;
		voidLinkHref = a.href;
		a.href = 'javascript:void(0);'
		a.target = '_self';
		setTimeout('UnvoidLink()', 100);
	}
	function UnvoidLink()
	{
		if(!(voidLink && voidLinkHref)) return;
		voidLink.href = voidLinkHref;
		voidLink.target = voidLinkTarget;
	}
	
/******************************************************************************
*** AJAX **********************************************************************
******************************************************************************/

	// source :
	// http://jibbering.com/2002/4/httprequest.html
	
	function UpdateStatusDiv(lang)
	{
		do {
			if(!document.getElementById) break;
			
			var xmlhttp = false;
			if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
			  xmlhttp = new XMLHttpRequest();
			}

			xmlhttp.open("GET", "http://www.garoo.net/"+lang+"/status.html", true);
			xmlhttp.setRequestHeader("Content-Type", "text/html; charset=ISO-8859-1");			
			xmlhttp.onreadystatechange = function() {
				if(xmlhttp.readyState != 4) return;
				if(!(b = document.getElementById("AJAXSTATUS"))) return;
				if(xmlhttp.status == 200) {
					b.innerHTML = xmlhttp.responseText;
				}
			}
			xmlhttp.send(null);
			
			return;
			
		} while(0);
	}

