

var phrases = new Array(4) ;
var phraseEnding = "<br /><a href='http://www.englishelearning.com' target='ecli'><img align='top' src='../images/propowlogo.gif' /></a><br /><a href='http://www.englishelearning.com' target='ecli'>www.englishelearning.com</a></p>";
var phraseEndingHome = "<br /><a href='http://www.englishelearning.com' target='ecli'><img align='top' src='lessons_wordlist/images/propowlogo.gif' /></a><br /><a href='http://www.englishelearning.com' target='ecli'>www.englishelearning.com</a></p>";
phrases[0] = '<p class="note">欲使用單字聆聽與紀錄及千種以上的其他功能請參考本公司其他產品';
phrases[1] = '<p class="note">English pronunciation 在學習文法及字彙之後, 請使用本公司其他產品來增進你的英語發音';
phrases[2] = '<p class="note">請參考這唯一能讓你藉發音來查訊單字的發音字典';
phrases[3] = '<p class="note">欲測驗你的文法及字彙請至';
   
function writeRandomAdvertize(extrainfo) {
   index = (Math.floor(Math.random() * phrases.length));
   if (extrainfo == "forhome") {
      document.getElementById("ad_phrase").innerHTML = phrases[index] + phraseEndingHome;
   } else {
      document.getElementById("ad_phrase").innerHTML = phrases[index] + phraseEnding;
   }
}

function popDetail(u) {
/*   popupWin = window.open("../details/" + u, "Detail", "bgColor=lightblue,fullscreen=no,toolbar=no,status=no,resizable=yes,directories=no,location=no,width=258,height=360,left=10,top=10"); */
   w = 258;
   h = 400;
   maxleft = screen.availWidth - w - 10;
   l = self.screenLeft + document.body.clientWidth;
   t = self.screenTop;
   if (l > maxleft ) {
      l = maxleft;
   }
   features = "width="+w+",height="+h+",left="+l+",top="+t;
   features += ",screenX="+l+",screenY="+t;
   features += ",scrollbars=0,resizable=1,location=0";
   features += ",menubar=0,toolbar=0,status=0";
   features += ",bgColor=lightblue";
   popupWin = window.open("../details/" + u, "Detail", features);
}

function popWindow(u,w,h,t) {
   popupWin = window.open(u, t, "bgColor=black,fullscreen=no,toolbar=no,status=no,resizable=yes,directories=no,location=no,width="+w+",height="+h+",left=10,top=10");
}

function showProperTestLink () {
   if (location.protocol == "file:") {
      document.getElementById("remotequiz").style.display = "block";
   } else {
      document.getElementById("internalquiz").style.display = "block";   
   }
}


