// JavaScript Document
function getWindowHeight(){
	var winW = 630, winH = 460;

	if (parseInt(navigator.appVersion)>3) {
	 if (navigator.appName=="Netscape") {
	  winW = window.innerWidth;
	  winH = window.innerHeight;
	 }
	 if (navigator.appName.indexOf("Microsoft")!=-1) {
	  winW = document.body.offsetWidth;
	  winH = document.body.offsetHeight;
	 }
	}
	return winW+"x"+winH+"x"+window.pageYOffset;
}
function setFlashHeight(h){
	document.getElementById("modelFlash").style.height = h;
}

function setFlashHeight2(h){
	// if(h > 1400){
		document.getElementById("babFlash").style.height = 1200;
//	}
}



function show_lightbox(imagepath){
	
	var newlink = document.createElement('a');
	largeImg = basename(imagepath, '.png');
	largeImg = largeImg + '.jpg';
	
 	newlink.setAttribute('class', 'table_gallery'); 
 	newlink.setAttribute('href', '/images/floorplans/large/'+largeImg);
	$('#popuplightbox').append(newlink);
	
	$('#popuplightbox a').lightBox();

	$('#popuplightbox a').click();
	$('#popuplightbox').html(''); 
	

}

function show_lightbox(imagepath){
	
	var newlink = document.createElement('a');
	
 	newlink.setAttribute('class', 'table_gallery'); 
 	newlink.setAttribute('href', imagepath);
	$('#popuplightbox').append(newlink);
	
	$('#popuplightbox a').lightBox();

	$('#popuplightbox a').click();
	$('#popuplightbox').html(''); 
	

}

