function getWindowHeight() {

//alert($(document).height() + ' - ' + $(window).height());
//return $(document).height();
    if ((document.all) || (document.getElementById)) send = document.body.clientHeight;
    if (document.layers) send = window.innerHeight;
    return send;
}


function getWindowWidth() {
    if ((document.all) || (document.getElementById)) send = document.body.clientWidth;
    if (document.layers) send = window.innerWidth;
    return send;
}

function ShowPopup(title, openpageurl, param, w, h) {

//    if (w == null) w = getWindowWidth() * 80 / 100;
//    if (h == null) h = getWindowHeight() * 80 / 100;

    if (w == null) w = $(window).width() * 80 / 100;
    if (h == null) h = $(window).height() * 80 / 100;

	
	var param_string = openpageurl + "?"
	if (param != null && param != "") param_string += param + "&";
	param_string +=	"KeepThis=true&height=" + Math.round(h) + "&width=" + Math.round(w) + "&modal=true&TB_iframe=true"
    tb_show(title, param_string, "");
    return false;
}


function getElement(objname) {
    return document.getElementById(objname);
}

function changeImg(url, id) {
    var el = getElement(id);
    el.src = url;
}
var iPosition = 0;
function scrollRIGHT() {
    var el = getElement("ctl00_ContentMain_photo_inner");
    var img = el.getElementsByTagName('input');
    if (iPosition <= (img.length - 3) * -78) { return; }

    iPosition = iPosition - 78;
    el.style.marginLeft = iPosition + "px";
}
function scrollLEFT() {
    var el = getElement("ctl00_ContentMain_photo_inner");
    iPosition = iPosition + 78;
    if (iPosition > 0) { iPosition = 0; return; }
    el.style.marginLeft = iPosition + "px";
}
  