function movepic(img_name,img_src) {
    document[img_name].src=img_src;
}

function popup(url){
    window.open(url, 'avail', 'toolbar=no,scrollbars=yes,resizable=yes,width=500,height=400,left=500,top=100,screenX=500,screenY=100');
}

function popupmap(url){
    mapwindow = window.open(url,'mapwin','top=50,left=150,screenX=150,screenY=50,width=600,height=600,location=no,scrollbars=yes,resizable=yes');
    mapwindow.focus();
}

function popupwritereview(url){
    window.open(url,'calwin','top=50,left=100,width=800,height=500,location=no,scrollbars=yes');
}

function Pics(img,text){
	
    var bName;
    var bver;
    bName = navigator.appName; //1
    bVer = parseInt(navigator.appVersion); //2
	if(bName == "Microsoft Internet Explorer" && bVer <= 4)
	{
	document.getElementById("theImage").src = img.replace("-th",'') ;
	document.getElementById("text1").innerText = text ;
	document.getElementById("text1").innerHTML = text ;
	
	}
	else if (bName == "Microsoft Internet Explorer" && bVer >= 4)
	{	
	 document.all.theImage.src=img.replace("-th",'') ;
	 document.all.text1.innerText= text;
	 document.all.text1.innerHTML = text;
	
	}
	else
	{
		
	document.getElementById("theImage").src= img.replace("-th",'') ;
	document.all.text1.innerText = text;
	document.all.text1.innerHTML = text;
	
	}
	/*

    url="/property/poppicture.php?img="+img+"&desc="+des;	
    if (bName == "Microsoft Internet Explorer" && bVer >= 4) {
	    document.all.ifr.style.width=wd;
        document.all.ifr.style.height=h;
	    document.all.ifr.contentWindow.document.location=url;
	    //document.all.imgDesc.innerHTML=des;		
	}
	else if (bName == "Microsoft Internet Explorer" && bVer <= 4) {
		document.getElementById("ifr").style.width=wd;
        document.getElementById("ifr").style.height=h;
		document.getElementById("ifr").document.location = url
		document.getElementById("imgDesc").innerHTML=des;
	}
	else {
        document.getElementById("ifr").style.width=wd;
        document.getElementById("ifr").style.height=h;
		document.getElementById("ifr").contentDocument.location=url
		document.getElementById("imgDesc").innerHTML=des;
	}
	*/
}
function Nexter(){
		if (currentIndx<imagesPreloaded.length-1){
		currentIndx=currentIndx+1;     
	
		document.theImage.src=imagesPreloaded[currentIndx]
		document.all['text1'].innerText =MyImageDesc[currentIndx]
		document.all['text1'].innerHTML =MyImageDesc[currentIndx]
			
		
	}
	else {
		currentIndx=0
		document.theImage.src=imagesPreloaded[currentIndx]
		document.all['text1'].innerText =MyImageDesc[currentIndx]
		document.all['text1'].innerHTML =MyImageDesc[currentIndx]

	}
	}
	function Backer(){
		if(currentIndx==0){		
			currentIndx=imagesPreloaded.length-1;
			document.theImage.src=imagesPreloaded[currentIndx]
			document.all['text1'].innerText =MyImageDesc[currentIndx]
			document.all['text1'].innerHTML =MyImageDesc[currentIndx]
		}
		else if (currentIndx>0){	
			currentIndx=currentIndx-1;
			document.theImage.src=imagesPreloaded[currentIndx]
			document.all['text1'].innerText =MyImageDesc[currentIndx]
			document.all['text1'].innerHTML =MyImageDesc[currentIndx]
		}
		else {
			currentIndx=0
			document.theImage.src=imagesPreloaded[currentIndx]
			document.all['text1'].innerText =MyImageDesc[currentIndx]
			document.all['text1'].innerHTML =MyImageDesc[currentIndx]
			}
		}






