﻿	function WinOpen(URL, name, width, height)
	{
		
		var leftPos = screen.width / 2 - width / 2;
		var topPos = screen.height / 2 - height / 2;
			
		window.open(URL,name,"height=" + height + ",width=" + width + ",status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=1,resizable=no,fullscreen=no,left=" + leftPos + ",top=" + topPos);
	}
	
	function ChangeCSSClass(object, cssClass) 
	{
		object.className = cssClass;
	}
	
	// funkcija za sirenje opisa polja 
	function Expand(div)
	{
		var objDiv = document.getElementById(div);
		if(objDiv.style.display == "none"){
			objDiv.style.display = "";
		}
		else
		{
			objDiv.style.display = "none";
		}
		
	}
	
	function ImageOver(object, objectLink) 
	{
		object.src = objectLink;
	}
	
	function Delete(msg, linkString)
	{
		if(confirm(msg))
		{
			window.location = linkString;
		}
	}
	
	function HideFlashObjects() 
	{
		var objects = document.getElementsByTagName("object");
		for (i=0; i<objects.length; i++) 
		{
			objects[i].style.visibility = "hidden";		
		}
	}
	
	function ShowFlashObjects() 
	{
		var objects = document.getElementsByTagName("object");
		for (i=0; i<objects.length; i++) 
		{
			objects[i].style.visibility = "visible";		
		}
	}
	
	function GetUrl(url)
	{
		window.location = url;
	}
	
	Shadowbox.init({
		// let's skip the automatic setup because we don't have any
		// properly configured link elements on the page
		skipSetup: true,
		// include the html player because we want to display some html content
		players: ["html"]
	});

	function GetPage() {
		
		var oPage = new Page();
		oPage.Get();
	}

	function ClosePage() {
		
		var oPage = new Page();
		oPage.Close();
	}
	
	function OpenOverlay()
	{
	
		// open a welcome message as soon as the window loads
		Shadowbox.open({
			content:    '<div id="responseContent" style="height:100%;"></div>',
			player:     "html",
			title:      "AUSWÄRTS-ZUHAUSE MEMBERS AREA",
			height:     420,
			width:      600,
            options : { onFinish : function(){GetPage();}, enableKeys: false }
		});
	
	};
