// +----------------------------------------------+ //
// |  Copyright©2009, Steven Douglas Huddleston   | //
// |             All Rights Reserved              | //
// | No portion of this code can be copied, used, | //
// | published or reproduced in any way without   | //
// | the expressed written consent of the author. | //
// +----------------------------------------------+ //
// | The Inter Galactic Touring Band Tribute Site | //
// +----------------------------------------------+ //

// +----------------------------------------------+ //
// |     Microsoft Internet Explorer Detection    | //
// +----------------------------------------------+ //

var IEBrowser = (navigator.appName.indexOf("Microsoft Internet Explorer") == -1) ? 0 : 1;
     
// +----------------------------------------------+ //
// |               Standard Postings              | //
// +----------------------------------------------+ //

function copyright() {
     d=new Date();
     y='' + d.getFullYear();
     document.write('Original Content Copyright &copy; 1999-' + y + ', Steven Douglas Huddleston, All Rights Reserved.');
     }

function postlink(URL,SID) {
     document.write('<a href="' + URL + '" target="_blank">' + SID + '</a><br/>');
}

// +----------------------------------------------+ //
// |             Audio Device Controls            | //
// +----------------------------------------------+ //

function insertaudio(loop) {
    if (!loop) {return;}
    if (IEBrowser) { 
         document.write('<bgsound id="audio" src="" loop="' + loop + '" />'); 
         }
    else
         {
         return; 
         }
    }

// +----------------------------------------------+ //
// |                WebMail Gizmos                | //
// +----------------------------------------------+ //

function getrecipient(eType) {
     switch (eType) {
        case  0: return('we' + 'b' + 'mast' + 'er' + '@k' + 'onga' + 'lo' + 'id.' + 'or' + 'g'); break;
        default: return('&#119;&#101;&#098;&#109;&#097;&#115;&#116;&#101;&#114;&#064;&#107;&#111;&#110;&#103;&#097;&#108;&#111;&#105;&#100;&#046;&#111;&#114;&#103;');
        }
     }

function KongaBuzz(sText) {
     execlnk = 'ma' + 'il' + 'to:' + getrecipient(IEBrowser) + '?' + 'sub' + 'j' + 'ect=' + encodeURIComponent(sText);
     window.location = execlnk;
     }

function HyperChange(sAddr, sText) {
     execlnk = 'ma' + 'il' + 'to:' + sAddr + '?' + 'sub' + 'j' + 'ect=' + encodeURIComponent(sText);
     window.location = execlnk;
     }

// +----------------------------------------------+ //
// |       Visitor Comments & Report Gizmos       | //
// +----------------------------------------------+ //

var c_cnt = 0;
var commentID = 0;

function opencomments(cid,tid) {
     window.open('http://www.kongaloid.org/koments.html?' + cid + '&' + tid,'Koments' + cid,'width=420,height=500,scrollbars=yes,resizable=yes,status=yes');
     }

function openguestbuk(cid,tid) {
     window.open('http://www.kongaloid.org/gbook.html?' + cid + '&' + tid,'GuestBook' + cid,'width=420,height=500,scrollbars=yes,resizable=yes,status=yes');
     }

function bugreport(bugtype,post) {
     // Define Report Type
     switch (bugtype) {
          case 'bug': rt='BUG'; break;
          case 'link': rt='BROKEN LINK'; break;
          case 'spell': rt='UNCOUTH-NESS'; break;
          }
     // Compose Message
     usr_nav = navigator.appName;
     send_to = getrecipient(IEBrowser);
     subject = rt + " report for: " + post;
     fmt_msg = "Your%20browser is%20" + usr_nav + ".%0D%0DPlease%20enter%20you%20comments%20(if%20any)%20below%20and%20click%20on%20send.%0D%0DThank you for helping to improve this website!%0D%0DYour%20Message:%0D";
     execlnk = 'ma' + 'il' + 'to:' + send_to + '?' + 'sub' + 'j' + 'ect=' + subject + '&' + 'bo' + 'dy=' + fmt_msg;
     // Send Report
     window.location = execlnk;
     }

// +----------------------------------------------+ //
// |              Amazon Popup Link               | // For use by the IGTB CD Floater Add
// +----------------------------------------------+ //

   function popUp() {
      amznwin=window.open('http://buybox.amazon.com/exec/obidos/redirect?tag=thekongaloidunde&amp;link_code=xsc&amp;creative=23424&amp;camp=2025&amp;path=/dt/assoc/tg/aa/xml/assoc/-/B00006IRLP/thekongaloidunde/ref=ac_bb5_','_amazon','location=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes,width=380,height=450,screenX=10,screenY=10,top=10,left=10');
      amznwin.focus();
      }

// +----------------------------------------------+ //
// |              Generic Button Link             | //
// +----------------------------------------------+ //

function linkbutton(txt,url) {
     document.write('<input type="button" value="' + txt + '" class="thinbutton" onclick="document.location=\'' + url + '\';" onmouseover="style.color=\'#0080FF\';" onmousedown="style.color=\'#ff0000\';" onmouseout="style.color=\'#0000ff\';">');
     }

function CSSValidator(url) {
     url = encodeURIComponent(url);
     win = window.open('http://jigsaw.w3.org/css-validator/validator?uri=' + url + '&amp;profile=css3&amp;usermedium=all&amp;warning=1&amp;lang=en','Validator'); 
     win.focus();
     }

function MarkupValidator(url) {
     url = encodeURIComponent(url);
     win = window.open('http://validator.w3.org/check?uri=' + url,'Validator'); 
     win.focus();
     }

// +----------------------------------------------+ //
// |            Document Update Stamp             | //
// +----------------------------------------------+ //

function updated() {

     x = new Date(document.lastModified);
     d = x.getDate();
     m = x.getMonth() + 1;
     y = x.getFullYear();

     switch (parseInt(m)) {
        case  1: m='JAN'; break;
        case  2: m='FEB'; break;
        case  3: m='MAR'; break;
        case  4: m='APR'; break;
        case  5: m='MAY'; break;
        case  6: m='JUN'; break;
        case  7: m='JUL'; break;
        case  8: m='AUG'; break;
        case  9: m='SEP'; break;
        case 10: m='OCT'; break;
        case 11: m='NOV'; break;
        case 12: m='DEC'; break;}

     document.write(d + ' ' + m + ' ' + y);
     }

// +----------------------------------------------+ //
// |           WIKIPedia Reference Links          | //
// +----------------------------------------------+ //

document.write('<form action="http://en.wikipedia.org/wiki/Special:Search" id="WIKISearch" target="_blank">');
document.write('<input id="searchInput" name="search" type="hidden" accesskey="f" value=""></form>');
     
function WIKISearch(srch) {
     document.getElementById('WIKISearch').searchInput.value=srch;
     document.getElementById('WIKISearch').submit();}

// +------------+ //
// | C'est Fini | //
// +------------+ //

