function uploadwindow(link){ newWindow=open(link,'ISWindow', 'width=550,height=500,status=no,toolbar=no,menubar=no,resizable=no,scrollbars=no'); } function include_dom(script_filename) { var html_doc = document.getElementsByTagName('head').item(0); var js = document.createElement('script'); js.setAttribute('language', 'javascript'); js.setAttribute('type', 'text/javascript'); js.setAttribute('src', script_filename); html_doc.appendChild(js); return false; } function count_strings(string, word) { var substrings = string.split(word); return substrings.length - 1; } var win=null;var mgtm;var tID=null;var prop=240;var tmR=false;var mgdly=1000;ctry='US'; function openWin5(url) { var jumpToHere; var winOptions; var popUpWindow; //alert(url); jumpToHere = url; winOptions = "top=100,left=200,width=550,height=400,scrollbars=yes"; popUpWindow = open(jumpToHere, "MyWindohw22", winOptions); } function submitform(){document.form1.submit();} function popUpWin(url, win, width, height, options){ var leftPos = (screen.availWidth - width) / 2; var topPos = (screen.availHeight - height) / 2; options += 'width=' + width + ',height=' + height + ',left=' + leftPos + ',top=' + topPos; return window.open(url, win, options); } function download(para) { window.open( "/GhanaHome/startDownload.asp?File="+para, "popupwin3", "toolbar=0,scrollbars=0,resizable=0,HEIGHT=50,WIDTH=230,location=0,statusbar=0,menubar=0,resizable=0"); } function Popup(){ var w = 640, h = 480; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var leftPos = w/2; var topPos = h/2; TheNewWin=window.open("/radio/", "radiopage","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=550,height=540,top=" + topPos + ",left=" + leftPos); TheNewWin.focus(); } function sendfeedback(){ var w = 640, h = 480; if (document.all || document.layers) { w = screen.availWidth; h = screen.availHeight; } var leftPos = w/2; var topPos = h/2; TheNewWin=window.open("/GhanaHome/mg_services/feedback.asp", "popupwinfeedback","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=490,height=490,top=" + topPos + ",left=" + leftPos); TheNewWin.focus(); } function toafriend(para){ window.open( para, "popupwin10", "toolbar=0,scrollbars=0,resizable=0,HEIGHT=500,WIDTH=640,location=0,statusbar=0,menubar=0,resizable=0"); } function quote(para){ window.open( para, "popupwin22", "toolbar=0,scrollbars=0,resizable=0,HEIGHT=200,WIDTH=400,location=0,statusbar=0,menubar=0,resizable=0"); } function currenyconverter(){ window.open( 'http://www.xe.com/pca/input.cgi?Template=full&FromSelect=GHS&ToSelect=USD', "currency", "toolbar=0,scrollbars=0,resizable=0,HEIGHT=220,WIDTH=630,location=0,statusbar=0,menubar=0,resizable=0"); } function InTT(){mgtm=prop;STC();STT();} function author(id){ window.open( '/GhanaHome/admin/sendmail.asp?id='+id, "feedbck", "toolbar=0,scrollbars=0,resizable=0,HEIGHT=250,WIDTH=450,location=0,statusbar=0,menubar=0,resizable=0"); } function showPoll(id){ window.open( '/GhanaHome/poll/showresults.asp?quest_id=' + id, "poll", "toolbar=0,scrollbars=0,resizable=0,HEIGHT=350,WIDTH=420,location=0,statusbar=0,menubar=0,resizable=0"); } function checkrequired(which) { var pass=true; if (document.images) { for (i=0;i0){ url=para+"&sids="+Math.random(); } else{ url=para; } xmlHttp.onreadystatechange=function(){ if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById(id).innerHTML=xmlHttp.responseText; } } xmlHttp.open("GET",url,true);mgtm=prop;xmlHttp.send(null); } function getVote(QUEST_ID,ANS_ID){ ajax('/ghanahome/poll/ajaxpost.asp?ANS_ID=' + ANS_ID + '&QUEST_ID=' + QUEST_ID,'poll'); } function swapImage(img){document.classimage.src=img;} function STC(){if(tmR){clearTimeout(tID);tmR=false;}} function changeImg(which,flag) { switch(which) { case "NxtBtn": switch (flag) { case 1: document.getElementById(which).src = "/images/buttons/next_over.gif" break; default: document.getElementById(which).src = "/images/buttons/next.gif" } break; case "PrvsBtn": switch (flag) { case 1: document.getElementById(which).src = "/images/buttons/prev_over.gif" break; default: document.getElementById(which).src = "/images/buttons/prev.gif" } break; default: } } function AddTag(t1,t2) { var textboxelement = document.formm.requiredmessage; if (is_ie5up) { if (document.selection) { textboxelement.focus(); var txt = textboxelement.value; var str = document.selection.createRange(); if (str.text == "") { str.text = t1 + t2; } else if (txt.indexOf(str.text) >= 0) { str.text = t1 + str.text + t2; } else { textboxelement.value = txt + t1 + t2; } str.select(); } } else if (is_nav4up) { var element = textboxelement; var sel_start = element.selectionStart; var sel_end = element.selectionEnd; MozillaInsertText(element, t1, sel_start); MozillaInsertText(element, t2, sel_end+t1.length); element.selectionStart = sel_start; element.selectionEnd = sel_end+t1.length+t2.length; element.focus(); } else { textboxelement.value = textboxelement.value + t1 + t2; } } function StripHtml(strInput) { //var regexpression = /<\S[^>]*>/g; strInput = strInput.replace("<","<"); strInput = strInput.replace(">",">"); return strInput; } function URLEncode(clearString) { var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '+'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } } return output; } function URLDecode(encodedString) { var output = encodedString; var binVal, thisString; var myregexp = /(%[^%]{2})/; while ((match = myregexp.exec(output)) != null && match.length > 1 && match[1] != '') { binVal = parseInt(match[1].substr(1),16); thisString = String.fromCharCode(binVal); output = output.replace(match[1], thisString); } return output; } var agt=navigator.userAgent.toLowerCase(); // *** BROWSER VERSION *** // Note: On IE5, these return 4, so use is_ie5up to detect IE5. var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)); var is_nav4up = (is_nav && (is_major >= 4)); var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); var is_ie3 = (is_ie && (is_major < 4)); var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) ); var is_ie4up = (is_ie && (is_major >= 4)); var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1)); var is_ie5up = (is_ie && !is_ie3 && !is_ie4); var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5); var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) ); var is_ie6up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5); function MozillaInsertText(element, text, pos) { element.value = element.value.slice(0,pos)+text+element.value.slice(pos); }