config = new Config();

function transparent(element)
{
	if(/MSIE (5\.5|6).+Win/.test(navigator.userAgent)) 
	{
		var src = element.src;
		element.src = config.spacerPath; 
		if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
	}
}

function showPic(pic, width, height)
{ 
	sDesrc = "width=" + width + ", height=" + height + ", status=no, toolbar=no, menubar=no, scrollbars=no";
	win = window.open("gallery_image.php?pic=" + pic, "", sDesrc);
}

function showVideo(video_id, width, height)
{ 
	sDesrc = "width=" + width + ", height=" + height + ", status=no, toolbar=no, menubar=no, scrollbars=no";
	win = window.open("video.php?video_id=" + video_id + "&width=" + width + "&height=" + height, "", sDesrc);
}

var send = function(link)
{
 	var dataToSend = document.getElementById('calendar_y').value + "." + document.getElementById('calendar_m').value;
 	var ajax = new httpAjaxRequest(); 
	if(ajax)
	{  
		ajax.prepareHash({date:dataToSend}); 
		ajax.open("GET", "ajax.php");
		ajax.send();
		ajax.getData();
		ajax.onreadystatechange = function()
		{ 
			data = ajax.getResult();
			document.getElementById("calendar_div").innerHTML = data.calendar; 
		}  
	}
 	else 
 	{
 		window.location = link + document.getElementById('calendar_y').value + "." + document.getElementById('calendar_m').value;
 	}
}
