/**
 * Ustawienie nowej wysokosci i szerokosci dla elementu
 * 
 *@param eName - nazwa id ktoremu trzeba ustawic rozmiar
 * @param eWidth - nowa szerokosc w px
 * @param eHeight -  nowa wysoksc w px
 *	
 */
function setHtmlElementSizeById(eIdName, eWidth, eHeight)
{
  console.info("setHtmlElementSizeById(" + eIdName +")");
	hElement = document.getElementById(eIdName);

	hElement.style.width = eWidth + "px";
	hElement.style.height = eHeight + "px";
	console.info(eIdName + " --> nowa wysokosc: " + hElement.style.height);
}

function getUrlVariableValue(valueName)
{
	var searchString = document.location.search;
	var valueName = valueName.toLowerCase();
	
	// strip off the leading '?'
	searchString = searchString.substring(1);

	var nvPairs = searchString.split("&");

	for (i = 0; i < nvPairs.length; i++)
	{
    	 var nvPair = nvPairs[i].split("=");
	     var name = nvPair[0].toLowerCase();
    	 var value = nvPair[1];
		 
		 if (valueName == name)
		 {
			 return value;
		 }
	}
	
	return "";
}

function getCurrentPageId()
{
	return getUrlVariableValue("pageId");
}

function getUrlParamsForFlash()
{
	var r = "pageId=" + getCurrentPageId() ;
	
	if (window.typeId !== undefined)
	{
		r += "&typeId=" + window.typeId;
	}
	
	return r;
}
