function DoPicUpload(wd){
 closeXplo()
 lft=screen.width-550;
 xplo=window.open('pman.php', wd, 'scrollbars=1,toolbar=0,location=0,directories=0,menuBar=0,resizable,status=1,top=0,left=0,width=500,height=480');
 xplo.focus();
}

function DoPassHash(wd){
 closeXplo()
 lft=screen.width-550;
 xplo=window.open('phashgen.php', wd, 'scrollbars,top=10,left='+lft+',width=500,height=480');
}

function closeXplo(){
 try {
  xplo.close();
 }
 catch(eee){
 }
 finally{
 }
}

function openwindow(url,name){
 xxc=window.open(url,name,'');
 xxc.focus();
 return false;
}

function popupradio(url,wd,ht){
 try {
  radio.close();
 }
 catch(eee){
 }
 finally{
 }
 radio=window.open(url,'radio','left=0,top=0,width='+wd+',height='+ht+',toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,status=0,resizable=0');
 radio.focus();
 return false;
}

function popupwin(url,wd,ht,id){
 if (id){
  x=document.getElementById('foto'+id+'lab_en');
  if (x.value!==''){
   cp=encodeURIComponent(x.value);
   url=url+cp;
   ht=parseInt(ht)+12;
  }
 }
 xxx=window.open(url,'big','left=0,top=0,width='+wd+',height='+ht+',toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,status=0,resizable=0');
 xxx.focus();
 return false;
}

function gopreview2(){
 if (!submitCheck())return false;
 ref=document.ModifyForm.reference.value;
 url='../properties/nerjaprop_router.php?doctype=9&reference='+ref;
 xplo=window.open(url,'big','left=0,top=0,toolbar=0,location=1,directories=0,menuBar=0,scrollbars=1,status=1,resizable=1');
 this.scrollbars=0;
 return false;
}

function charRemaining(tField, nField, maxAllowed) {
 if (tField.value.length > maxAllowed) tField.value = tField.value.substring(0, maxAllowed);
 nField.value = maxAllowed - tField.value.length;
}

var menu_ddown = function() {
 var cssRule;
 var newSelector;
 for (var i = 0; i < document.styleSheets.length; i++)
  for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
   {
   cssRule = document.styleSheets[i].rules[x];
   if (cssRule.selectorText.indexOf("LI:hover") != -1)
   {
    newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
    document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
   }
  }
 var getElm = document.getElementById("nav").getElementsByTagName("LI");
 for (var i=0; i<getElm.length; i++) {
  getElm[i].onmouseover=function() {
   this.className+=" iehover";
  }
  getElm[i].onmouseout=function() {
   this.className=this.className.replace(new RegExp(" iehover\\b"), "");
  }
 }
}
if (window.attachEvent) window.attachEvent("onload", menu_ddown);

function externalLinks(){
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "mywinxxx";
 }
}

function externalLinksNoFollow(){
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "nofollow") anchor.target = "mywinxxx";
 }
}

function externalLinksJavascipt(){
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") && anchor.getAttribute("class") == "sub" && anchor.getAttribute("id") == "sub")
   {
	   anchor.rel = "nofollow";
	   anchor.target = "";
   }
 }
}

function reloadDate() {
document.getElementById('localtime').innerHTML=new Date().toLocaleTimeString(); setTimeout("reloadDate();", 1000);
}

//window.onload = externalLinks;