/************* JavaScript By Brankov ******************/
/*var ws = screen.availWidth;
var hs = screen.availHeight;
var wd = document.body.width;
var hd = document.body.height;
var ww = window.availWidth;
var hw = window.availHeight;*/


/*********************** popUp ***************************/

function show_popup(picName, topImg)
{
	var p=window.createPopup();
	var pbody=p.document.body;
	pbody.style.backgroundColor="white";
	pbody.style.border="solid #aaaaaa 1px";
	pbody.innerHTML ='<center><h2>'+picName+'</h2></center>';
	pbody.innerHTML+='<br>';
	pbody.innerHTML+='<center><img src="../images/contstructionlogo.gif" name="'+picName+'" width="300" border="0" id="'+picName+'"></center>';
	pbody.innerHTML+='<br>';
	//pbody.innerHTML+='<a href="javascript: close();">close</a>';
	pbody.innerHTML+='<br>' + topImg + 'px';
	p.show(400,300 + topImg,320,370,document.body);
}

function open_win_pic(picID)
{
param = '/gallery/pic_viewer.php?picID='+picID;
window.open(param,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=580, height=450")
}

function resizeWindow()
{
top.resizeTo(500,300);
}

function open_win(idArticle, idMenu, idLang)
{
param = 'article_viewer.php?idArticle='+idArticle+'&idMenu='+idMenu+'&idLang='+idLang;
window.open(param,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=620, height=600")
}

function open_win_alert(url)
{
window.open(url,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=620, height=450")
}


function deleteRecord(theLink, table)
{
	confirmation = window.confirm('Neao?ie ee noa, ?a eneaoa aa eco?eaoa oice caien?');
    if (confirmation) {
        theLink.href += '&del_is_js_confirmed=1&table='+table;
    }
}

function changeSource(src)
	{
		src = src+document.getElementById('sourceLang').value+"#form";
		//window.alert(src);
		window.open(src,"_top");
		//document.getElementById('menu_form').submit();
	}

function closeWindowTimeOut(timeInterval)
	{
		timeInterval = timeInterval*1000;
		setTimeout('window.close()', timeInterval);
	}

function goBackWindowTimeOut(timeInterval)
	{
		timeInterval = timeInterval*1000;
		setTimeout('window.history.back()', timeInterval);
	}