function GetURLArguments( str_argument )
{
	var i;
	var str_URL = document.location.href;
	var str_args = str_URL.substring(str_URL.indexOf('?')+1);
	var str_list_args = str_args.split('&amp;');
	var str_list_item;
	var str_result = "";		
	for ( i=0; i<str_list_args.length; i++) 
	{
		str_list_item = str_list_args[i].split("=");
		if( str_list_item[0] == str_argument )
		{
	        str_result = str_list_item[1];
	        i = str_list_args.length;
	    }
	}
	return(str_result);
}

function window_resize()
{
		document.getElementById("frame_main").style.height = (document.documentElement.clientHeight - 120) + "px";
	try
	{
	}
	catch(err) {}
}


// view.htm
var m_str_current_object_id = "view_summer";

function ShowView( str_object_id )
{
	document.getElementById(m_str_current_object_id).style.display = "none";
	document.getElementById(str_object_id).style.display = "block";
	m_str_current_object_id = str_object_id;
}

//
function PrintPage( obj_button )
{
	obj_button.style.display = "none";
	window.print();
	obj_button.style.display = "block";
}


function Initialize( b_index_page )
{
	var str_url;
	if(b_index_page)
	{
		window.onresize = window_resize;
		window_resize();
	
		str_url = GetURLArguments("url");
		if(str_url != "")
		{
			document.getElementById("frame_main").src = unescape(str_url);
		}
	}
	else
	{
		try
		{
			if(document.location == top.location)
			{
				document.location = "index.htm?url=" + escape(document.location);
			}
		}
		catch(err) {}
	}
}
