
// ////////////////////
// to adjust divs depending on window inner height

function adjustContentHeight (){	
var elmnt;
var windowheight;
var minusheight;
	var browsertype;
 var divcontainer = document.getElementById("container");
	var divshopframe_clamp = document.getElementById("shopframe_clamp");
	var divshopframe = document.getElementById("shopframe");
	var divshopiframe_fs = document.getElementById("shopiframefs");
	var shopiframe = document.getElementById("shopiframe");
	var divbanner = document.getElementById("banner");
	var divcontent = document.getElementById("content");
	var divframeclamp = document.getElementById("frameclamp");
	var divleftclamp = document.getElementById("leftclamp");

if (parseInt(navigator.appVersion)>3) {
 if (navigator.appName=="Netscape") {
  windowheight = window.innerHeight;
		minusheight = 190;
		browsertype = 1;
 }
 if (navigator.appName.indexOf("Microsoft")!=-1) {
  windowheight = document.documentElement.clientHeight;
		minusheight = 200;
		browsertype = 2;
 }
}

if (divcontainer.offsetHeight > windowheight){
		windowheight = divcontainer.offsetHeight;
		if (browsertype==1) minusheight = 77;
		if (browsertype==2) minusheight = 97;
	}
//alert(windowheight);
resize (divcontent , windowheight - minusheight, windowheight); 
resize (shopiframe , windowheight - minusheight);
resize (divshopiframe_fs , windowheight - minusheight);
}

function resize (elmnt, height, windowheight){
    if(!isSet(elmnt)){ 
				return;
				}
				if(elmnt.offsetHeight > windowheight){
					return;
					}
    if(typeof elmnt!='object') {
					fatherElmnt=document.getElementById(elmnt);
					}
    if(!elmnt){ 
				return;
				}
    if (!isSet(height)) {
				height=0;
				}
    elmnt.style.height = height + "px";
}

function isSet (prm)
{
    var und;
    return(prm!=und && prm!=null);
}


/// ////////////
// go4it
function initAll (){
    adjustContentHeight ();
}


function swapImage (id, src){
	var img = document.getElementById (id);
	img.src = src;
}


///// End Swap Image /////

window.onload = initAll;

