var tmp;

function NewXmlHttp()
{
	var xmlHttp;
	if(window.XMLHttpRequest){ // FF, Opera, Safari
		try
		{
			xmlHttp	= new XMLHttpRequest ();
		}
		catch(e)
		{
			xmlHttp	= null;
		}
	
	}
	else if(window.ActiveXObject){ // IE..
		var xmlHttpVersion = new Array ("MSXML2.XMLHTTP.6.0",
			"MSXML2.XMLHTTP.5.0",
			"MSXML2.XMLHTTP.4.0",
			"MSXML2.XMLHTTP.3.0",
			"MSXML2.XMLHTTP",
			"Microsoft.XMLHTTP");
			for(var i=0; i<xmlHttpVersion.length; i++){
				try
				{
					xmlHttp	= new ActiveXObject(xmlHttpVersion[i]);		
				}
				catch(e){
					xmlHttp = null;	
				}
			}		
	}
	
		if(!xmlHttp){
			alert ("Błąd podczas tworzenia obiektu xmlHttp");
		}
		else{
			return xmlHttp;
			
		}
}


function Confirm(text,location) {
	if (confirm(text)) {
		parent.location.href=location;return true;
	} else {}
}

function Confirm_(text,location,pswd) {
	var echo=prompt(text,"");
	if (echo != null && echo == pswd) {parent.location.href=location;}
}

function getImageWidth( src ) {
	var imageObject = new Image();
	imageObject.src = src;	
	return imageObject.width;
}

function getImageHeight( src ) {
	var imageObject = new Image();
	imageObject.src = src;	
	return imageObject.height;
}

function showBig(img){
	window.open('/data/Image/'+ img +'','','toolbar=0, location=0, status=0, menubar=0, scrollbars=0, resizable=0, width='+ getImageWidth('/data/Image/'+ img +'') +',height='+ getImageHeight('/data/Image/'+ img +'') +'');		
}

