
var ppUp;
function popUpDefaultSize(URL) {
  popUp(URL, 150, 150);
}
function popUp(URL, width, height) {
  closePpUp();
  ppUp = window.open(URL, "", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + ",left = 0,top = 0");
}
function closePpUp() {
  if ((ppUp != null) && (!ppUp.closed)) {
    ppUp.close();
  }
}
function popupDetail(id) {
  url = "detail.faces?id=" + encodeURIComponent(id);
  popUp(url, 850, 600);
}
function openFactsheet(code) {
  url = "http://www.publicitas.com/publicard.asp?publicode=" + code + "&lng=1";
  popUp(url, 700, 600);
}
function closePopupRefresh() {
  try {
    window.parent.hidePopupFrameRefresh();
  }
  catch (error) {
    window.top.hidePopupFrameRefresh();
  }
}

function closePopupRefreshReversed(){
   try{
     window.parent.hidePopupFrameRefreshReversed();
   }
   catch(error)
   {
     window.parent.hidePopupFrameRefreshReversed();
   }
}
function closePopup() {
  try {
    window.parent.hidePopupFrame();
  }
  catch (error) {
    window.top.hidePopupFrame();
  }
}
function popup(url, id) {
  url = url + "?id=" + id;
  popUp(url, 600, 325);
}
function onEnter(evt) {
  var keynum = null;
  if (window.event) { // IE
    keynum = evt.keyCode;
  }
  if (evt.which) { // Netscape/Firefox/Opera
    keynum = evt.which;
  }
  if (13 == keynum) {
    document.forms["form1"].elements["form1:simulatedIncludedSubform1:searchButton"].click();
    return false;
  }
  return true;
}
function moveRight() {
  document.forms["form1"].elements["form1:simulatedIncludedSubform1:addOne"].click();
  return false;
}
function moveLeft() {
  document.forms["form1"].elements["form1:simulatedIncludedSubform1:removeOne"].click();
  return false;
}
function setCookies() {
  if (document.domain == "localhost") {
    document.cookie = "uti%5Fid=cucu1;path=/DBMediaNews";
  } else {
    document.cookie = "uti%5Fid=cucu1;path=/DBMediaNews;domain=" + document.domain;
  }
}
function deleteCookies() {
  if (document.domain == "localhost") {
    document.cookie = "uti%5Fid=cucu1;path=/DBMediaNews;expires=" + new Date().toGMTString();
  } else {
    document.cookie = "uti%5Fid=cucu1;path=/DBMediaNews;domain=" + document.domain + ";expires=" + new Date().toGMTString();
  }
}


