
function getClientWidth() {

var viewportwidth;
var viewportheight;
 
// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
 if (typeof window.innerWidth != 'undefined')
 {
      viewportwidth = window.innerWidth,
      viewportheight = window.innerHeight
 }
 
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientWidth !=
     'undefined' && document.documentElement.clientWidth != 0)
 {
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
 }
 
 // older versions of IE
 
 else
 {
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 }
//document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
return viewportwidth;

}

function getClientHeight() {

var viewportwidth;
var viewportheight;
 
// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
 if (typeof window.innerWidth != 'undefined')
 {
      viewportwidth = window.innerWidth,
      viewportheight = window.innerHeight
 }
 
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 else if (typeof document.documentElement != 'undefined'
     && typeof document.documentElement.clientWidth !=
     'undefined' && document.documentElement.clientWidth != 0)
 {
       viewportwidth = document.documentElement.clientWidth,
       viewportheight = document.documentElement.clientHeight
 }
 
 // older versions of IE
 
 else
 {
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 }
//document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
return viewportheight;

}

function getLeftColumnWidth() {

	var viewportwidth = getClientWidth();
	var leftColumnWidth = parseInt(viewportwidth * 0.382);

	return leftColumnWidth;
}

function setLeftColumnWidth(width) {

	document.getElementById('framecontentLeft').style.width = width + "px";
	//document.getElementById('framecontentTop').style.width = width + "px";
	//document.getElementById('framecontentTop').style.width = "100%";
	document.getElementById('framecontentTop').style.left = width + "px";
	document.getElementById('maincontent').style.left = width + "px";
	document.body.style.paddingLeft = width + "px";
	
	
}

function fillStudioPhoto() {
	var width = getLeftColumnWidth();
	if (width > 600) {
		src="img/studio/sedova-600.jpg";
	} else if (width > 400) {
		src="img/studio/sedova-400.jpg";
	} else {
		src="img/studio/sedova-300.jpg";
	}
	document.write("<img src='"+ src +"'>");
}

function chooseImg() {
	var width = getLeftColumnWidth();
	if (width > 600) {
		src="img/studio/sedova-600.jpg";
	} else if (width > 400) {
		src="img/studio/sedova-400.jpg";
	} else {
		src="img/studio/sedova-300.jpg";
	}
	return src;
}

function showLeftPanelNavigation() {

		var src = chooseImg();
		//alert(src);
		//alert("fadein");
		$("#studio_show_container_img").attr("src", src);
//        $("#studio_show_container").show("slow");
        $("#studio_show_container").fadeIn(5000);

}

function hideLeftPanelNavigation() {

//		var src = chooseImg();
		//alert("fadeout");
//		$("#studio_show_container_img").attr("src", src);
//        $("#studio_show_container").show("slow");
        $("#studio_show_container").fadeOut(5000);

}