// JavaScript Document
// Pop-Up Embedder Script by Edward, www.edenregained.com;
var UniqueID = 314 // Make each link open in a new window.
var newWinOffset = 0 // Position of first pop-up
var semicol=';'
var quot='"'
function ArticleOpen(soundfiledesc,soundfilepath,docfilepath) {

PlayWin = window.open('',UniqueID,'width=920,height=600,top=' + newWinOffset +',left=0,resizable=1,scrollbars=1,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0,addressbar=0');
PlayWin.focus(); 
var winContent = "<HTML><HEAD><TITLE>" + soundfiledesc + "</TITLE>";
winContent += "<link rel='StyleSheet' href='star.css' type='text/css'>";
winContent += "<script language='JavaScript' type='text/javascript' src='ratingpop.js'></script>";
winContent += "</HEAD>";
winContent += "<BODY>";

winContent += "<table><img src='articles/header.jpg' alt='EdenBanner'></table><BR>";

winContent += "<B style='font-size:18px;font-family:Verdana,sans-serif;line-height:1.5'>" + soundfiledesc + "</B><BR><BR>";

winContent += "<TABLE><TR>Listen:<object type='application/x-shockwave-flash' data='dewplayer-multi.swf?mp3=" + soundfilepath + "&amp;autostart=1&amp;showtime=1&amp;' width='240' height='20'>";
winContent += "<param name='wmode' value='transparent' /><BR>";
winContent += "<param name='movie' value='dewplayer-multi.swf?mp3=" + soundfilepath + "&amp;showtime=1' /><BR>"; 
winContent += "</OBJECT><BR></TR><BR>";

winContent += "<TR>Rate it:<ul class='star-rating'>";
winContent += "<li><a href=" + quot + "#" + quot +" title='Rate this 1 star out of 5' class='one-star' onclick=" + quot + "javascript:StarsOpen('" + soundfiledesc + "','stars','Stars Count','1star.php')" + semicol + " return false " + quot + " >1</a></li>";
winContent += "<li><a href=" + quot + "#" + quot +" title='Rate this 2 star out of 5' class='two-stars' onclick=" + quot + "javascript:StarsOpen('" + soundfiledesc + "','picts/stars','Stars Count','2star.php')" + semicol + " return false" + quot + " >2</a></li>";
winContent += "<li><a href=" + quot + "#" + quot +" title='Rate this 3 star out of 5' class='three-stars' onclick=" + quot + "javascript:StarsOpen('" + soundfiledesc + "','stars.','Stars Count','3star.php')" + semicol + " return false" + quot + " >3</a></li>";
winContent += "<li><a href=" + quot + "#" + quot +" title='Rate this 4 star out of 5' class='four-stars' onclick=" + quot + "javascript:StarsOpen('" + soundfiledesc + "','stars','Stars Count','4star.php')" + semicol + " return false" + quot + " >4</a></li>";
winContent += "<li><a href=" + quot + "#" + quot +" title='Rate this 5 star out of 5' class='five-stars' onclick=" + quot + "javascript:StarsOpen('" + soundfiledesc + "','stars','Stars Count','5star.php')" + semicol + " return false" + quot + " >5</a></li>";

winContent += "</ul></TR></TABLE><BR>";

winContent += "<TABLE cellpadding='0' cellspacing='0' border='0' width='100%'><tr><td align='left' valign='top'>";
winContent += "<iframe name='cwindow' style='border:1px dotted Green' width='100%' height='500%' src='" + docfilepath + "'></iframe>";
winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:center'><a href='"+docfilepath+"'>Download this file</a> <SPAN style='font-size:10px'>(right-click or Option-click)</SPAN></p>";
winContent += "<FORM><DIV align='center'><INPUT type='button' value='Close this window' onClick='javascript:window.close();'></DIV></FORM>";
winContent += "</TABLE></BODY></HTML>";
PlayWin.document.write(winContent);
PlayWin.document.close(); // "Finalizes" new window
UniqueID = UniqueID + 1
// newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower.
}