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; } function get_textarea(textarea_obj) {return(textarea_obj.value);} function set_textarea(textarea_obj,txt) {textarea_obj.value = txt;} var win=null;var mgtm;var tID=null;var prop=90;var tmR=false;var mgdly=1000; function append_textarea(textarea_obj,txt) {textarea_obj.value += txt;} function get_selection() { if (document.getSelection) { var txt = window.getSelection(); } else if (document.selection && document.selection.createRange) { var range = document.selection.createRange(); var txt = range.text; } else { var txt = "Sorry, this is not supported with your browser."; } return(txt); } function formatText(txt2) { var textarea_obj = document.formm.requiredmessage var txt = get_selection(); var existing_txt = get_textarea(textarea_obj); var string_count = count_strings(existing_txt,txt); if (txt == "" || string_count > 1) { append_textarea(textarea_obj,txt2); } else if (txt != null) { var new_txt = existing_txt.replace(txt,txt2); set_textarea(textarea_obj,new_txt); } } 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, "MyWindow22", 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 ringtone(para) { window.open( "/GhanaHome/ringtonepopup.asp?id="+para, "popupwin2", "toolbar=0,scrollbars=0,resizable=0,HEIGHT=50,WIDTH=230,location=0,statusbar=0,menubar=0,resizable=0"); } 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("/GhanaHome/media/radio/radionew.asp", "popupwin30","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=550,height=530,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 = "http://img.modernghana.com/images/buttons/next_over.gif" break; default: document.getElementById(which).src = "http://img.modernghana.com/images/buttons/next.gif" } break; case "PrvsBtn": switch (flag) { case 1: document.getElementById(which).src = "http://img.modernghana.com/images/buttons/prev_over.gif" break; default: document.getElementById(which).src = "http://img.modernghana.com/images/buttons/prev.gif" } break; default: } }