var g_target = top.frames.ooas_main;

function onClickBody() {
	try{g_target.hideAllMenus()}catch(e){}
}
function onScrollBody() {
	try{g_target.hideAllMenus()}catch(e){}
}

function cPictPar(sPath,nWidth,nHeight,sTitle,sDesc) {
	this.Path = sPath;
	this.Width = nWidth;
	this.Heigth = nHeight;
	this.Title = sTitle;
	this.Desc = sDesc;
	return(this);
}
var PictPar;
function showPicture(sPath,nWidth,nHeight,sTitle,sDesc) {
		var cX = 6/8;
		var bScroll = 0;
		var iW = nWidth;
		var iH = nHeight+25;
		if(iW<150){iW=150}; if(iH<100){iH=100};
		if(iW>screen.availWidth){iW=cX*screen.availWidth;iH+=22;bScroll=1};
		if(iH>screen.availHeight){iH=cX*screen.availHeight;iW+=22;bScroll=1};
		sBPath = getBasePath();
		PictPar = cPictPar(sBPath+"/"+sPath,nWidth,nHeight,sTitle,sDesc);
		var oWnd = window.open(sBPath+"/ShowPicture.aspx","_blank", "height="+iH+",width="+iW+",resizable=1,menubar=0,status=0,location=0,scrollbars="+bScroll+";directories=0");
}

function getBasePath() {
	var sBaseUrl = window.location.href;
	if(sBaseUrl.toLowerCase().indexOf("ooas")>-1) {
		if(sBaseUrl.toLowerCase().indexOf("ooas.cz/new")>-1) {
			iEnd = sBaseUrl.indexOf("/",sBaseUrl.toLowerCase().indexOf("ooas.cz/new")+9);
		} else {
			iEnd = sBaseUrl.indexOf("/",sBaseUrl.toLowerCase().indexOf("ooas"));
		}
		return(sBaseUrl.substring(0,iEnd))
	} else {
		return("");
	}
}

function GoToPage(sURL) {
	window.location.href = sURL;
}
