var _BROWSER=new Object()
_BROWSER.name=navigator.appName; 

var prefixPath="";
function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
} 
function findPosYpos(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
	 
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else 
		if (obj.y)
			curtop += obj.y;
	return curtop;
}
 
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); };
var k=0;
var imageOverLeftPos="-620px"
function showBigImg(img,tg)
{
		posY=findPosYpos(tg);
		img='<img src="'+img+'" style="border-style: solid; border-width: 1px; border-color: #cccccc; padding-top: 3px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px">';
		if(idiv=document.getElementById('popUpImageDiv'))
		{
			idiv.style.top=posY+"px";
			idiv.innerHTML=img
		}
		else
		{
			divForImage=document.createElement("div");
			divForImage.style.position="absolute";
			//divForImage.style.marginTop="-100px";
			//divForImage.style.marginLeft=0;
			divForImage.style.marginLeft=imageOverLeftPos;
			divForImage.style.padding="3px";
			divForImage.style.display="none";
			divForImage.style.background="#ffffff";
			divForImage.id="popUpImageDiv";
			divForImage.style.top=posY+"px";
			divForImage.innerHTML=img			
			ifrForAlert=document.body.appendChild(divForImage);
		}
	 	showDiv(tg)
}
function showDiv(tg)
{
	if(document.getElementById('popUpImageDiv'))
		document.getElementById('popUpImageDiv').style.display="inline";
}
function hideBigImg(tg)
{
	
		if(document.getElementById('popUpImageDiv'))
			document.getElementById('popUpImageDiv').style.display="none";
}

function showBigLastImg(img,tg)
{
	if(img!="")
	{
	 img='<div style=\'position:absolute;margin-top:-75px;margin-left:110px;padding:5px;border:1px solid #efefef;background-color:#E1E1E1\'><img style="margin:0px;padding:0px" src="'+img+'"></div>';
	 divs=tg.getElementsByTagName('div');
	  
	 if(!divs||divs.length==0)
	 {
	 	tg.innerHTML+=img
	 	
	 }
	 divs[0].style.display="inline"
	}
	 
}
function hideLastImg(tg)
{
	
	divs=tg.getElementsByTagName('div');
	if(divs.length>0)
	{
		divs[0].style.display="none"
	}
}

function popup(url,windowName,height,width,scrollbars)
{
	if(scrollbars == ''){
		
		scrollbars='no';	
	}
	
	newwindow=window.open(url,windowName,"width="+width+",height="+(height+50)+",location=no,scrollbars="+scrollbars);
	
	if (window.focus)
	{
		newwindow.focus()
	}
	return false;
}
function popup2(url,windowName,height,width,scrollbars)
{
	if(scrollbars == ''){
		
		scrollbars='no';	
	}
	
	newwindow=window.open(url,windowName,"width="+width+",height="+(height+50)+",location=no,scrollbars="+scrollbars);
	
	if (window.focus)
	{
		newwindow.focus()
	}
	 
}
function VOID()
{
}
	var pageLoadComplete="loading"

function loadComple()
{
	pageLoadComplete="complete"
}
function showHideBox(theName)
{
	if(!document.getElementById(theName))
		return;
	if (document.getElementById(theName).style.display == 'none')
	{
		document.getElementById(theName).style.display = '';
	}
	else
	{
		document.getElementById(theName).style.display = 'none';
	}
}
function explodeArray(item,delimiter) {
  tempArray=new Array(1);
  var Count=0;
  var tempString=new String(item);

  while (tempString.indexOf(delimiter)>0) {
    tempArray[Count]=tempString.substr(0,tempString.indexOf(delimiter));
    tempString=tempString.substr(tempString.indexOf(delimiter)+1,tempString.length-tempString.indexOf(delimiter)+1); 
    Count=Count+1
  }

  tempArray[Count]=tempString;
  return tempArray;
}
function addEvent(elm, evType, fn, useCapture) 
// addEvent and removeEvent
// cross-browser event handling for IE5+,  NS6 and Mozilla
// By Scott Andrew
{
 if (elm.addEventListener){
   elm.addEventListener(evType, fn, useCapture);
   return true;
 } else if (elm.attachEvent){
   var r = elm.attachEvent("on"+evType, fn);
   return r;
 }
}
addEvent (window,'load',loadComple)
var imgPaths=Array();
var urlType="http://";
imgPaths[0]=urlType+"/emlakresmi_b/"
imgPaths[1]=urlType+"/emlakresmi_m/"





var getUrlObject = {
	// UTF destekli url encode decode fonksiyonlari
	// public method for url encoding
	encode : function (string) {
		return escape(this._utf8_encode(string));
	},

	// public method for url decoding
	decode : function (string) {
		return this._utf8_decode(unescape(string));
	},

	// private method for UTF-8 encoding
	_utf8_encode : function (string) {
		string = string.replace(/\r\n/g,"\n");
		var utftext = "";

		for (var n = 0; n < string.length; n++) {

			var c = string.charCodeAt(n);

			if (c < 128) {
				utftext += String.fromCharCode(c);
			}
			else if((c > 127) && (c < 2048)) {
				utftext += String.fromCharCode((c >> 6) | 192);
				utftext += String.fromCharCode((c & 63) | 128);
			}
			else {
				utftext += String.fromCharCode((c >> 12) | 224);
				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
				utftext += String.fromCharCode((c & 63) | 128);
			}

		}

		return utftext;
	},

	// private method for UTF-8 decoding
	_utf8_decode : function (utftext) {
		var string = "";
		var i = 0;
		var c = c1 = c2 = 0;

		while ( i < utftext.length ) {

			c = utftext.charCodeAt(i);

			if (c < 128) {
				string += String.fromCharCode(c);
				i++;
			}
			else if((c > 191) && (c < 224)) {
				c2 = utftext.charCodeAt(i+1);
				string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
				i += 2;
			}
			else {
				c2 = utftext.charCodeAt(i+1);
				c3 = utftext.charCodeAt(i+2);
				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
				i += 3;
			}

		}
		return string;
	}

}

var browserObject = {
	ie			: function () {		return (navigator.userAgent.indexOf('MSIE')!= -1)?1:0;		},
	ff			: function () {		return (navigator.userAgent.indexOf('Firefox')!= -1)?1:0;	},
	netscape	: function () {		return (navigator.userAgent.indexOf('Netscape')!= -1)?1:0;	},
	opera		: function () {		return (window.opera)?1:0;									},
	safari		: function () {		return (navigator.vendor.indexOf('Apple')!= -1)?1:0;		},
	konqueror	: function () {		return (navigator.vendor.indexOf('KDE')!= -1)?1:0;			}
}