var nc=1; var x=0;  //ses,ffses,winname defined in makejslive



if (window.opener) 



{ x=window.opener.x+50; window.name=window.opener.name+"_P_"+nc; }

else {x=50; window.name=winname;}



function fix(url,ff) 

{ if (ff==1) 

    return "http://www.livingdirectory.net/"+addp(url)+ffses;

  else if(ff==2) return "http://"+url; 

  else return addp(url)+ses;

}



function murl(url)

{ url=url.replace(/&/g,'%26'); 

  url=url.replace('?','%3F'); 

  return url;  

}



function wo(url,w,h,ff) 

{ wp="dependant=1,resizable,scrollbars,menubar=0,locationbar=0,";

  wp+="toolbar="+(ff?1:0)+",statusbar=0,screenX="+x+",screenY="+x;

  wp+=","+"top="+x+",left="+x+",width="+w+",height="+h;

  WH=window.open(fix(url,ff),window.name+"_P",wp);

  WH.focus();

}



function sm(p1,p2,p3) {location.href="mailto:"+p1+"@"+p2+"?subject="+p3;}



function addp(url) {return url+((url.indexOf("?")==-1)?"?":"&");}



function sndupd(script,url,id) 

{ nc+=1; id="iu"+id; url=script+".php?"+ses+"&nc="+nc+"&type="+url;

  document.getElementById(id).src=url;

  var clr="document.getElementById('"+id+"').src='img/tranc.gif'";

  setTimeout(clr,600);

}

