function plPrint(id) { window.print(); } function plLink(id) { url = "/wp-content/plugins/post_links/link_text.php?id="+id; pl_newWindow (url,'pllink',500,200); } function plRecommend(get) { url = "/wp-content/plugins/post_links/tell_a_friend.php?"+get; pl_newWindow (url,'plrecommend',500,600); } function pl_newWindow(url,winName,width,height,position){ if(position=="random") { leftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-width)):100; topPosition=(screen.height)?Math.floor(Math.random()*((screen.height-height)-75)):100; } else { // center leftPosition=(screen.width)?(screen.width-width)/2:100; topPosition=(screen.height)?(screen.height-height)/2:100; } settings='width='+width+',height='+height+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes'; win=window.open(url,winName,settings); win.focus(); }