
function oPic( sPic ) {
 eval("window.open('pic.asp?ID=" + sPic + "','sPic','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=550,height=450')");
}

function formCheck(){
	fali = "";
	
	if (document.obrazac.ime.value == "") fali = fali + "\n- Ime";
	if (document.obrazac.adresa.value == "") fali = fali + "\n- Adresu";
	if (document.obrazac.mjesto.value == "") fali = fali + "\n- Mjesto";
	if (document.obrazac.poruka.value == "") fali = fali + "\n- Poruku";
	if (fali != "")
	   alert("Niste upisali sve potrebne podatke!" + "\n\n" + "Molimo upišite:" + fali)
	else
	 document.obrazac.submit();
}

function top() {
  window.scrollTo(0, 0);
}


function back() {
  history.back();
}  


function openGalleryImg ( nID ) {
  eval("var f=window.open('gallPic.asp?id=" + nID + "','gallery','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500 ,height=400');f.focus();");
}

function openPressClip ( nID) {
  eval("var f=window.open('pressClip.asp?name=" + nID + "','gallery','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');f.focus();");
}

function getEl(sId) {
  return (document.all? document.all(sId): (document.getElementById? document.getElementById(sId): null));
};

// prikaz slike iz galerije
function initGal() {
  nContentWidth = getEl('contentPic').clientWidth;
	nContentHeight   = getEl('contentPic').clientHeight;
  if ( navigator.appName == 'Netscape' ) {
   	self.resizeTo( nContentWidth+6, nContentHeight+37 );
  }
  else {
   	self.resizeTo( nContentWidth+10, nContentHeight+19 );
  }
}

// ispis članaka u pressclippingu
function init() {
  nContentWidth = getEl('contentPic').clientWidth;
	if (getEl('contentPic').clientHeight >= 500)
	{
			nContentHeight = 500;
	}
	else {
	  nContentHeight   = getEl('contentPic').clientHeight;
	}
  if ( navigator.appName == 'Netscape' ) {
   	self.resizeTo( nContentWidth+22, nContentHeight+45 );
  }
  else {
   	self.resizeTo( nContentWidth+26, nContentHeight+28 );
  }
}


function openWinFlash(url, w, h)
{
var winprop = "width=" + w + ",height=" + h;
openwin = window.open(url,'',winprop);
}

