

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">在学习语法及词汇之后，请使用我们的一种产品以改进您的英语发音';
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";   
   }
}


