﻿// JScript File

function Zoom(URL) 
{
 day = new Date();
 id = day.getTime();
 eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=452,height=454');");
}

function MoreViewSwitchRoomCollection(containerid,img_url,zoom_button_id,zoom_on,image_uri)
{
    if (containerid!=null)
    {
        var container=document.getElementById(containerid);
        if (container!=null) container.setAttribute("src",img_url);
        var btnZoom=document.getElementById(zoom_button_id);
        if (btnZoom!=null) btnZoom.style.visibility=zoom_on;
        
        var zoom_button=document.getElementById("zoom_button");
        if (zoom_button!=null)
        {
			var zoom_prefix_cont=document.getElementById("__zoom_prefix");
			if (zoom_prefix_cont!=null)
			{
				var zoom_prefix=zoom_prefix_cont.getAttribute("value");
				if (zoom_prefix.length>0)
				{
					var zoom_suffix_cont=document.getElementById("__zoom_suffix");
					if (zoom_suffix_cont!=null)
					{
						var zoom_suffix=zoom_suffix_cont.getAttribute("value");
						if (zoom_suffix.length>0)
						{
							var zoom_url=zoom_prefix + image_uri + zoom_suffix;
							var zoom_call="javascript:Zoom('" + zoom_url + "');";
							zoom_button.setAttribute("href",zoom_call);
						}
					}
				}
			}
        }
    }
}