// -------------------------------------------------------------------
// Creator: Intranet Team
// Project: Javascript Library
// Filename: .js
//
// Purpose: Provide a library of javascript functions for web site use.
// -------------------------------------------------------------------

function getSegmentName(segment){
  if(segment == "2"){         segName = "Not Found";
  } else if(segment == "7"){  segName = "General Navigation";
  } else if(segment == "8"){  segName = "Sales Marketing";
  } else if(segment == "9"){  segName = "Human Resources";
  } else if(segment == "10"){ segName = "Finance";
  } else if(segment == "11"){ segName = "Info Systems";
  } else if(segment == "12"){ segName = "Operations";
  } else if(segment == "18"){ segName = "Development";
  } else if(segment == "19"){ segName = "Homepage";
  } else if(segment == "20"){ segName = "Search";
  } else {                    segName = "Unknown"; }
  return segName;
}

function checkSearchRadio(form){
  for (i=0, n=form.type.length; i<n; i++) {
    if (form.type[i].checked) {
      var checkvalue = form.type[i].value;
      break;
    }
  }
  return checkvalue;
}

function addHiddenField(nam, val, frm){
  var input = document.createElement("input");
  with (input) {
    type  = "hidden";
    name  = nam;
    value = val;
  }
  frm.appendChild(input);
}

  function setCheckedValue(radioObj, newValue) {
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
  }
  
function getDevProdAddress(location){

  if(location == 'Test'){
    address = 'http://localhost/GlobalDesis/';
  } else {
    address = 'http://www.globaldesis.com/GlobalDesis/';
  }
  
  return address;
}

function buildURLArray(addressArray){
  url = new Array();
  for(i=0; i < addressArray.length; i++){
    if(addressArray[i] != ''){
      url.push(addressArray[i]);
    }
  }
  return url;
}

function checkSubWeb(needle, haystack){
  for(i=0; i < haystack.length; i++){
    if(needle == haystack[i]){
      found = true;
      break;
    } else {
      found = false;
    }
  }
  return found;
}

function getDevProd(){

  /**
  urlArray = buildURLArray(location.href.split('/'));
  
  if(urlArray[1].substr((urlArray[1].length)-6, 6) == ":10000" || urlArray[1].substr((urlArray[1].length)-6, 6) == ":10010"){
    env = 'Test';
  } else {
    env = 'Production';
  }
  **/
  
  var env;
  
  if(location.href.indexOf('localhost') > -1){
    env = 'Test';
  } else {
    env = 'Production';
  }
  return env;
}

function buildDevMessage(){
  
  if(getDevProd() == 'Test'){  
    var prodURL = location.href.replace('localhost', 'www.GlobalDesis.com');
    //var prodURL = prodURL.replace(':10010', '');
  
    var message = "<table width='100%' border='0' cellpadding='7' cellspacing='0' bgcolor='#990000'><tr><td align='center' style='font: 11px arial,helvetica,sans-serif; color: #fff;'><strong>You are currently viewing the Development version of the GlobalDesis website.</strong><br>To view the Production version of this page, <a href='" + prodURL + "' style='font: 11px arial,helvetica,sans-serif; color: #fff;'>click here</a>.</td></tr></table>";
    document.write(message);
  }  
}

function buildTabs(){

  var root;
  
  if(getDevProd() == 'Test'){
    root = 'http://localhost/GlobalDesis/';
    //root = location.href;
  } else {
    root = 'http://www.globaldesis.com/GlobalDesis/';
  }
  
  //tabsText = new Array('Home', 'Events', 'Classifieds', 'Jobs', 'Roommates', 'Message Board', 'Matrimonial', 'Tech FAQs', 'Gallery', 'More');
  //tabsText = new Array('Home', 'Classifieds', 'Finance', 'Blogs', 'Cricket', 'News', 'Kids', 'Movies', 'Tech FAQs', 'Events', 'Forum', 'Tickets', 'More');
  tabsText = new Array('Home', 'Classifieds', 'Jobs', 'Roommates', 'Events', 'Matrimonial', 'Tech FAQs', 'Gallery', 'Message Board', 'More');
  tabsLink = new Array(root, root + 'Ads/', root + 'jobsearch', root + 'Room', root + 'events/events.asp', root + 'matrimony', root + 'faq', root + 'Gallery', root + 'forum', root + '');

  selectedTab = '';
  tabCode = '';
  
  var dropHeight = '';
  
  if(location.href.indexOf('localhost') > -1){
    dropHeight = 131;
  } else {
    dropHeight = 89;
  }
  
  url = location.href;
/*
  url = url.replace(':10000', '');
  url = url.replace(':10010', '');
  url = url.replace('#', '');
  url = url.replace('http://localhost/GlobalDesis/', '');
  url = url.replace('http://www.globaldesis.com/GlobalDesis/', '');
*/

  for (x=0; x < tabsText.length; x++){

    highlight = '';

    //if(tabsText[x] == 'Home' && (url == '' || url == 'index.htm')){
    if(tabsText[x] == 'Home' && url.indexOf('sis/default') > -1){
      highlight = 'true';
    } else if(tabsText[x] == 'Classifieds' && (url.indexOf('Ads') > -1 || url.indexOf('ads') > -1)){
      highlight = 'true';
    } else if(tabsText[x] == 'Jobs' && (url.indexOf('jobsearch') > -1 || url.indexOf('Jobsearch') > -1)){
      highlight = 'true';
    } else if(tabsText[x] == 'Roommates' && (url.indexOf('Room') > -1 || url.indexOf('room') > -1)){
      highlight = 'true';
    } else if(tabsText[x] == 'Events' && (url.indexOf('Events') > -1 || url.indexOf('events') > -1)){
      highlight = 'true';
    } else if(tabsText[x] == 'Matrimonial' && (url.indexOf('Matrimony') > -1 || url.indexOf('matrimony') > -1)){
      highlight = 'true';
    } else if(tabsText[x] == 'Tech FAQs' && (url.indexOf('Faq') > -1 || url.indexOf('faq') > -1)){
      highlight = 'true';
    } else if(tabsText[x] == 'Gallery' && (url.indexOf('Gallery') > -1 || url.indexOf('gallery') > -1)){
      highlight = 'true';
    } else if(tabsText[x] == 'Message Board' && (url.indexOf('Forum') > -1 || url.indexOf('forum') > -1)){
      highlight = 'true';
    } else if(tabsText[x] == 'More' && (url.indexOf('More') > -1 || url.indexOf('More') > -1)){
      highlight = 'true';
    } else {
      highlight = 'false';
    }
    
    if(highlight == 'true'){    
      selectedTab = '_on';
      tabClass = 'On';
      linkColor = '#ffffff';
    } else {
      selectedTab = '';
      tabClass = '';
      linkColor = '#000000';
    }
    
    if(x==0){
      tabCode = tabCode + '<td width=\"5\"><img src=\"' + root + 'images/npl/pixel.gif\" width=\"1\" height=\"1\"></td>';
    }
    
    if(tabsText[x] == 'Quick Links'){
    
      dropDivisions = '';
                       
      tabText = dropDivisions;

    } else {    
      tabText = '<a href=\"' + tabsLink[x] + '\" class=\"tabLink' + tabClass + '\"><font color=\"' + linkColor + '\">' + tabsText[x] + '</font></a>';                  
    }   
    
    tabCode = tabCode + '<td nowrap width=\"4\"><img src=\"' + root + 'images/npl/nav_left' + selectedTab + '.gif\" width=\"5\" height=\"27\"></td>' +
                        '<td nowrap background=\"' + root + 'images/npl/nav_bg' + selectedTab + '.gif\">' + tabText + '</td>' +
                        '<td nowrap width=\"4\"><img src=\"' + root + 'images/npl/nav_right' + selectedTab + '.gif\" width=\"5\" height=\"27\"></td>' +
                        '<td nowrap width=\"2\"><img src=\"' + root + 'images/npl/pixel.gif\" width=\"1\" height=\"1\">';
  }
  
  return tabCode;
}

node7 = true;

//DROP-DOWN: QUICK LINKS
function menudata1(){

  /*---------------------------------------------
  Expand Icon Images
  ---------------------------------------------*/

  /*---------------------------------------------
  Menu Container Settings
  ---------------------------------------------*/

  //Main Container
  //this.main_container_border_width = "1px"
  //this.main_container_border_style = "none"
  //this.main_container_styles =       "background-color:#edf2fd;		\
                                      //border-color:#06c;"

  //Sub Containers
  this.subs_container_padding = "2px, 2px, 2px, 2px"
  this.subs_container_border_width = "1px"
  this.subs_container_border_style = "solid"
  this.subs_container_styles =       "background-color:#edf2fd; //		\
                                      border-color:#06c;"

  /*---------------------------------------------
  Menu Item Settings
  ---------------------------------------------*/

  //Main Items
  this.main_item_padding = "0px"
  this.main_item_styles =  "text-decoration:none;		\
                            font-weight:bold;			\
                            font-family:verdana,helvetica,sans-serif;			\
                            font-size: 11px;			\
                            color:#000;			\
                            border-style:none;			\
                            text-decoration:none;			\
                            text-align:left;			\
                            border-style:solid;			\
                            border-color:#06c;		\
                            border-width:0px;"

/**
  this.main_item_hover_styles =  "text-decoration:underline;"
                                  //background-color:#fff;		\
                                  //color:#000;"


  this.main_item_active_styles = "background-color:#ffffff;		\
                                  text-decoration:none;		\
                                  color:#039;"
**/

  //Sub Items
  this.subs_item_padding = "2px,5px,2px,5px"
  this.subs_item_styles =  "text-decoration:none;		\
                            font-face:verdana,helvetica,sans-serif;			\
                            font-size:11px;			\
                            font-weight:normal;			\
                            color:#039;			\
                            text-align:left;			\
                            border-style: none;			\
                            border-color:#06c;		\
                            border-width:0px;"


  this.subs_item_hover_styles =  "text-decoration:none;		\
                                  background-color:#edf2fd;		\
                                  font-weight:bold;			\
                                  color:#039;"

/**
  this.subs_item_active_styles = "text-decoration:none;		\
                                  //background-color:#ffffff;		\
                                  color:#039;"
**/

  /*---------------------------------------------
  Additional Setting
  ---------------------------------------------*/

  //Main Menu Orientation
  this.main_is_horizontal = false;

  //Main Menu Item Widths
  //this.main_item_width = 100			//default width for all items
  this.main_item_width0 = 150		//optional specific width for the first menu item
  this.main_item_width1 = 150		//optional specific width for the second menu item...
  this.main_item_width2 = 150		//optional specific width for the third menu item...

  //The mouse off and mouse over delay for sub menus
  this.menu_showhide_delay = 175;
}

function GetRSSNews(location){

  var iMax = 5

  var rssDoc = new ActiveXObject("Microsoft.XMLDOM")
  rssDoc.async = false
  rssDoc.load(location)

  var headNode = rssDoc.selectNodes("/rss/channel")
  var itemNodes = rssDoc.selectNodes("/rss/channel/item")

  if(itemNodes.length<iMax){
   iMax = itemNodes.length
  }

  var feedBody = "<ul>";

  for(i=0;i<iMax;i++){
   feedBody = feedBody + "<li style=\"padding: 2px;\"><a href='" + itemNodes.item(i).getElementsByTagName("link").item(0).text + "'>" + itemNodes.item(i).getElementsByTagName("title").item(0).text + "</a></li>"
  }

  feedBody = feedBody + "</ul>";

  myFeeds.innerHTML  = feedBody
  //myChannel.innerText = headNode.item(0).getElementsByTagName("title").item(0).text
}

function linkToText(string){
  string = string.replace(/_/g, ' ');
  string_array = string.split(' ');
  new_string = '';
  for(a=0; a < string_array.length; a++){
    if(string_array[a] == 'of' || string_array[a] == 'and' || string_array[a] == 'a'){
      temp_word = string_array[a];
    } else {
      temp_word = string_array[a].substr(0,1).toUpperCase() + string_array[a].substr(1,string_array[a].length);
    }    
    new_string = new_string + ' ' + temp_word;
  }
  return new_string;
}

function cleanURL(url_array){
  url = new Array();
  for(i=0; i < url_array.length; i++){
    if(url_array[i] != ''){
      url.push(url_array[i]);
    }
  }
  return url;
}

function getParameter(name) {
   var url = window.location.href;
   var paramsStart = url.indexOf("?");

   if(paramsStart != -1){

      var paramString = url.substr(paramsStart + 1);
      var tokenStart = paramString.indexOf(name);

      if(tokenStart != -1){

         paramToEnd = paramString.substr(tokenStart + name.length + 1);
         var delimiterPos = paramToEnd.indexOf("&");

         if(delimiterPos == -1){
            return paramToEnd;
         }
         else {
            return paramToEnd.substr(0, delimiterPos);
         }
      }
   }
}


function getRootCrumb($directory){

  if(checkSubWeb($directory, subwebs_finance)){  
    crumbLink = "/info_nav/fin/";
    crumbText = "Finance";    
  } else if(checkSubWeb($directory, subwebs_humanResources)){  
    crumbLink = "/info_nav/hr/";
    crumbText = "Human Resources";    
  } else if(checkSubWeb($directory, subwebs_infoSystems)){  
    crumbLink = "/info_nav/ssd/";
    crumbText = "Information Services";    
  } else {
    crumbLink = "/";
    crumbText = "Unknown";  
  }
  
  crumbArray = new Array(); 
  crumbArray[0] = crumbLink;
  crumbArray[1] = crumbText;
  
  return crumbArray;
}

function buildCrumbs(address){

  if(address.indexOf('index.html')){
    index = address.indexOf('index.html');
  } else if(address.indexOf('index.htm')){
    index = address.indexOf('index.htm');
  } else {
    index = -1;
  }
  
  if(index > 0){
    address = address.substring(0, index, address);
  }

  //document.write(address);

  url = cleanURL(address.split('/')); 
  crumbs = '';
  
  if(url.length > 2){
  
    root = '/';    
    buildURL = url[2];
    
    crumb_arrow = '<span class=\"crumbArrow\">&nbsp;&gt;&nbsp;</span> ';
    crumbs = '<a href=\"http://' + url[1] + '/\" class=\"crumbLink\">Home</a> ' + crumb_arrow;
    
    if(url[2] == "zonetemplate" || url[2] == "wcms_project" || url[2] == "webdomain"){
    
      if(url[2] == "zonetemplate"){
        crumbLink = "/zonetemplate/";
        crumbText = "Zone Template";
      } else if(url[2] == "wcms_project"){
        crumbLink = "/wcms_project/";
        crumbText = "WCMS Project";
      } else {
        crumbLink = "/webdomain/";
        crumbText = "Web Domain";
      }
    
      if(url[3] != null){    
        rootCrumb = "<a href=\"" + crumbLink + "\" class=\"crumbLink\">" + crumbText + "</a> ";
      } else {
        rootCrumb = "<span class=\"crumbText\">" + crumbText + "</span> ";
      }
    
    } else {   
    
      crumbInfo = getRootCrumb(url[2]); 
      
      if(url[3] != null){    
        rootCrumb = "<a href=\"" + crumbInfo[0] + "\" class=\"crumbLink\">" + crumbInfo[1] + "</a> ";
      } else {
        rootCrumb = "<span class=\"crumbText\">" + crumbInfo[1] + "</span> ";
      }
    }  
    
    crumbs = crumbs + rootCrumb;    
    if(url.length > 3){
      crumbs = crumbs + crumb_arrow;
    }    
   
    for(x=3; x < url.length; x++){    
      if(url[x] != ''){
      
        buildURL = buildURL + '/' + url[x]; //'/' + 

        if(url[x].indexOf('.') > 0 || url[x+1] == null){
          link_start = '<span class=\"crumbText\">';
          link_end = '</span>'
        } else {
          link_start = '<a href=\"/' + buildURL + '\" class=\"crumbLink\">';
          link_end = '</a> ' + crumb_arrow;
        }

        if(url[x].indexOf('.') > 0){
          url[x] = url[x].substr(0, url[x].indexOf('.'));
        }

        crumbs = crumbs + link_start + linkToText(url[x]) + link_end;
      }
    }
  }
  return crumbs;
}

  function breadcrumbs(){
    sURL = new String;
    bits = new Object;
    var x = 0;
    var stop = 0;
    var crumb_arrow = '<span class=\"crumbArrow\">&nbsp;&gt;&nbsp;</span> ';
    var output = "<a href=\"/\" class=\"crumbLink\">Home</A> " + crumb_arrow;

    sURL = location.href;
    sURL = sURL.slice(8,sURL.length);
    chunkStart = sURL.indexOf("/");
    sURL = sURL.slice(chunkStart+1,sURL.length)

    while(!stop){
      chunkStart = sURL.indexOf("/");
      if (chunkStart != -1){
        bits[x] = sURL.slice(0,chunkStart)
        sURL = sURL.slice(chunkStart+1,sURL.length);
      } else {
        stop = 1;
      }
      x++;
    }

    for(var i in bits){
      output += "<a href=\"";
      for(y=1;y<x-i;y++){
        output += "../";
      }
      output += bits[i] + "/\" class=\"crumbLink\">" + linkToText(bits[i]) + "</a> " + crumb_arrow;
    }
    document.write(output + "<span class=\"crumbText\">" + document.title + "</span> ");
  }

function emailPage(url, title){
  window.location.href = 'mailto:?subject=' + title + '&body=' + url;
}

function bookmark(url, description){
  var ver = navigator.appName; 
  var num = parseInt(navigator.appVersion); 
  if(ver == "Microsoft Internet Explorer" && num >= 4){
    window.external.AddFavorite(url, description);
  } else {
    alert("Don't forget to bookmark our site!");
  }
}

function checkRadio(buttons){
  for(i=0; i < buttons.length; i++) if(buttons[i].checked) return true;
  return false;
}

function checkTextArea(area){
  if(area.value.length > 0){
    return true;
  } else {
    return false;
  }
}

function popWindow(msg) {
  var popUp = window.open("","newWindow", "HEIGHT=400, WIDTH=550, scrollbars=yes, toolbar=no, status=no, resizable=yes");
  popUp.document.write(msg);
  popUp.document.close();
}


function setAction(){
  document.form1.action="/cgi-bin/mailback.pl?ref=" + document.referrer;
}

function openWindow(url, x, y,name,status,menubar,scrollbars,toolbar,directories,resizable)  { 

// This is the way it use to be: "status=yes,menubar=no,scrollbars=yes,toolbar=no,directories=no,resizable=yes

if (x == null) {x=""};
if (y == null) {y=""};
if( name == null ) {name=""};
if( status == null ) {status="yes"};
if( menubar == null ) {menubar="no"};
if( scrollbars == null ) {scrollbars="yes"};
if( toolbar == null ) {toolbar="no"};
if( directories == null ) {directories="no"};
if( resizable == null ) {resizable="yes"};
var attList = "status=" + status;
attList += ",menubar=" + menubar;
attList += ",scrollbars=" + scrollbars;
attList += ",toolbar=" + toolbar;
attList += ",directories=" + directories;
attList += ",resizable=" + resizable;
attList += ",width=" + x + ",height=" + y;
win = window.open(url,name,attList);
win.focus();
}

function setCookie(name,value,expires,path,domain,secure){
// Sets the value of the named cookie.
//
// Args: name  - string containing the name of the cookie.
//       value - string containing the value of the cookie.
//       expires - Date containing the expiration of the cookie.
//       path - string containing the path specifing page association.
//       domain - string containing the domain specificatin of the cookie.
//       secure - boolean stating if the cookies are securly transmitted.
//
  if( value.length == 0)
    value=" ";
  var cookie=name + "=" + escape(value);
  if(expires)
    cookie+= '; expires=' + expires.toGMTString();
  if(path)
    cookie+= '; path=' + path;
  if(domain)
    cookie+= '; domain=' + domain;
  if(secure)
    cookie+= '; secure';
  document.cookie=cookie;
}

function getCookie(name){
// Gets the value of the named cookie.
//
// Args: name  - string containing the name of the cookie.
//
  var value="";
  allCookies = document.cookie;
  pos = allCookies.indexOf(name);
  if(pos != -1){
    start = pos + name.length + 1;
    end = allCookies.indexOf(";", start);
    if( end == -1 ) end = allCookies.length;
    value = allCookies.substring(start,end);
    value = unescape(value);
    return value;
  }
  else
    return "";
}

function getAllCookies(){
// Gets all the cookies in an array.
//
// Args: none
//
  var a = document.cookie.split(";");
  for(var i=0; i<a.length; i++){
    a[i] = a[i].split('=');
  }
  for(var i=0; i<a.length; i++){
    a[[i][1]] = unescape(a[[i][1]]);
  }
  return a;
}

function removeCookie(name){
// Removes the named cookie.
//
// Args: name  - string containing the name of the cookie.
//
  cookie = name + "=junk";
  cookie += '; expires=Fri, 02-Jan-1970 00:00:00 GMT';
  document.cookie=cookie;
}

function scrollToText(string,listName){
// Set the item in a scrolling list "selected" 
//
// Args: string   - search string
//       listName - the select object
//
  var text = string.toUpperCase();
  var length = text.length;
  var listLen = listName.length;
  for(i=0; i<listLen; i++)
  {
    value = listName.options[i].text.toUpperCase();
    if( text == value.substr(0,length))
    {
      listName.options[i].selected=true;
      return;
    }
  }
}

function showResults(){
// Shows the poll results in a seperate window
//
   var w=window.open("/cgi-bin/poll/showResults.pl","PollResults","width=220,height=350,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,top=50,left=50, alwaysRaised");
}

function processPoll(form,cookieValue){
// Verifies poll selection and sets cookie
//
  var check =document.cookie;
  if (check.indexOf(cookieValue) != -1) {
	alert("You can only vote in the poll one time--sorry!");
	location.reload();
  }
  for(i=0; i < form.r1.length; i++){
    if(form.r1[i].checked){
      var date = new Date();
      date.setMonth(date.getMonth() + 1);
      //document.cookie=cookieValue + escape(document.lastModified) + "; expires=" + date.toGMTString();
      setCookie("pollCookie",cookieValue,date);
      document.pollForm.submit();
      return true;
    }
  }
  alert("You must make a selection");
  return false;
}

var xwin=null;
function handler(form){
// Function called to handle events from "search" field
// for select list on home page
//
  var e = window.event;
  var id = e.keyCode;
  var curIdx = document.Relocate.relo1.selectedIndex;
  var maxIdx = document.Relocate.relo1.length - 1;
  if(id == 38){
    if(curIdx == 0)
      document.Relocate.relo1.selectedIndex=maxIdx;
    else
      document.Relocate.relo1.selectedIndex--;
  }
  else if(id == 40){
    if(curIdx == maxIdx)
      document.Relocate.relo1.selectedIndex=0;
    else
      document.Relocate.relo1.selectedIndex++;
  }
  else
    scrollToText(form.scrolltext.value,form.relo1)
}

// Adds list of form elements to field "fields"
//---------------------------------------------
function getAllFormFields(form){
  if(! form.fields ){
    elem = document.createElement("input");
    elem.setAttribute("type", "hidden");
    elem.setAttribute("name", "fields");
    elem.setAttribute("value", "");
    for(i=0; i<=form.elements.length-1; i++){
      elem.value += form.elements[i].name + ",";
    }
    form.appendChild(elem); 
  }
  else{
    form.fields.value="";
    for(i=0; i<=form.elements.length-1; i++){
      form.fields.value += form.elements[i].name + ",";
    }
  }
  return true;
}

function validateDate(inputDate){
// Assumes an input date in the format month/day/year 
  var myDateArray = inputDate.split("/");
  var month = myDateArray[0];
  month --;
  var day = myDateArray[1];
  var year = myDateArray[2];
  var myDate = new Date(year,month,day);
  
  my_month = myDate.getMonth();
  
  /* If we entered "Feb 31, 1975" in the form, the "new Date()" function
  converts the value to "Mar 3, 1975". Therefore, we compare the month
  in the array with the month we entered into the form. If they match,
  then the date is valid, otherwise, the date is NOT valid. */
  if ( my_month != month ) {
    return false;
  } else {
    return true;
  }
}

function closeWindow(){
  window.close();
}

/**********************************************
var nav = window.Event ? true : false;
if (nav) // Navigator
  document.captureEvents(Event.CLICK);
document.onclick = leavingBZ;

function leavingBZ(e){
  var s = nav ? new String(e.target): new String(event.srcElement);
  if( s.search(/http/i) != -1 ){
    if( (s.search(/localhost/i) == -1) && (s.search(/globaldesis.com/i) == -1) )
      alert("You are now leaving the GlobalDesis web site.  www.GlobalDesis.com does not exercise editorial control over the page(s) to which you are linking.  Unless otherwise stated in the web site, GlobalDesis makes no endorsement of the entity sponsoring the linked Web site and assumes no responsibility for the content contained therein. Please click OK to continue.");
  }
}
**********************************************/




