// JavaScript Document
// Bug Free
function getXMLHTTPRequest() {
try {
req = new XMLHttpRequest();
} catch(err1) {
  try {
  req = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (err2) {
    try {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (err3) {
      req = false;
    } 
  } 
}
return req;
}
var http = getXMLHTTPRequest();
  
function getText() {
  var myurl = 'messageBody/homeDiv.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl+"?rand="+myRand;  
  http.open("GET", modurl, true);
  http.onreadystatechange = useHttpResponse;
  http.send(null);
}

function getText() {
  var myurl = 'messageBody/homeDiv.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl+"?rand="+myRand;  
  http.open("GET", modurl, true);
  http.onreadystatechange = useHttpResponse;
  http.send(null);
}

function useHttpResponse() {
   if (http.readyState == 4) {
    if(http.status == 200) { 
       var timeValue = http.responseXML.getElementsByTagName("timenow")[0];
       document.getElementById('showtime').innerHTML = '              <div id="leftHeadingAjaxableID" class="leftHeadingAjaxable"><strong>DBP Corporation in a Glance</strong></div>'
                  +'About our company:'
+'Who we are'+
'We at Derron and Brooks Paragon Corporation have committed ourselves to provide high level of professional business offer and competitively-priced on our products and services to meet our client’s ever-changing needs.<br /><br />'+

'Our delivery on this commitment is the reason we’re the 1st Corporation that offers various type of services in Cagayan De Oro City, Philippines, with a primary objective to earn excellent ratings and establish good business relationship with our clients. It is also our intention to take good care of our clients and offers them a quality of service they will never forget. Our philosophy is based on the saying that says “The life blood of business are repeats and referrals” This can only be made possible if we earned satisfied clients who are willing and committed to stay with us for long term business relationship and most importantly will tell and refer other people to do business with us.'+
				
'<!--<div id="apDiv10"><form><input type="button" value="<< " onClick="getText()"></form>--></div><div id="apDiv9"><form><input type="button" value=" >>" onclick="getText2()" /></form></div></div>';
    }
  } else {
  document.getElementById('showtime').innerHTML = '<p>&nbsp;</p><p>&nbsp;</p>&nbsp;<p></p><div align ="center"><img src="ajax/loading.gif"></div>';
  }
}

function getText2() {
  var myurl = 'messageBody/homeDiv.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl+"?rand="+myRand;  
  http.open("GET", modurl, true);
  http.onreadystatechange = useHttpResponse2;
  http.send(null);
}

function useHttpResponse2() {
   if (http.readyState == 4) {
    if(http.status == 200) {
       var timeValue = http.responseXML.getElementsByTagName("timenow2")[0]; 
       document.getElementById('showtime').innerHTML = timeValue.childNodes[0].nodeValue;
	   document.getElementById('showtime').innerHTML = '<div id="leftHeadingAjaxableID"><strong>WHAT WE DO:</strong></div><strong>'+'For you and your family</strong><br /><br />'+
'Derron and Brooks Paragon Corporation, through its various services, offers advices on your travels, tour plans and booking of flights in our local attractive tourists spots here in the Philippines and even in your travels and tours abroad. We are also trading imported cosmetics, perfumes, accessories, branded apparels and clothings in retail and wholesale basis.<br /><br />'+
'<strong>For your company</strong><br /><br />'+
'From small to big commercial businesses we cater business and accounting programming, web designing and web hosting management and other kind of data resource services to solve your ever-changing business needs. Furthermore, we are also involved in the distribution of bakery products and other health related products only in a wholesale basis. '
	   +
	   '<div id="apDiv10"><form><input type="button" value="<< " onClick="getText()"></form></div>';
    }
  } else {
  document.getElementById('showtime').innerHTML = '<p>&nbsp;</p><p>&nbsp;</p>&nbsp;<p></p><div align ="center"><img src="ajax/loading.gif"></div>';
  }
}

<!--Vision and Mission--> // use var:http
function vision() {
  var myurl = 'messageBody/homeDiv.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl+"?rand="+myRand;  
  http.open("GET", modurl, true);
  http.onreadystatechange = useHttpResponse3;
  http.send(null);
}

function useHttpResponse3() {
	
   if (http.readyState == 4) {
    if(http.status == 200) { 
       var timeValue = http.responseXML.getElementsByTagName("timenow2")[0]; 
       document.getElementById('showtime').innerHTML = '<div id="leftHeadingAjaxableID"><strong>DBPC WebMail Beta!</strong></div>THE VISION BEHIND THE PROJECT!'+
           '<p>DBPC supports and promote all good Open Source Projects. We are establishing a society awareness venture through modeling the use of different kinds of open source software to encourage individuals and businesses alike, to use them to enhance communication transactions, competent with the current trend and demands of technology. The Webmail Project by <strong>Roundcube</strong> has a huge impact on how people "think about business" and "communicate that business", which will ultimately enhance how they "do business". DBPC feels obliged to inform the public of its potentials to leverage business communication transactions as a portal or gateway to virtually unlimited opportunities in the world wide web and the net.</p>'+
           'MAKING THINGS POSSIBLE IS OUR MISSION!</div>'+
         '<p>To achieve that vision, DBPC is passionate to model the creation of different new Open Source Projects as well. For this reason, DBPC gave birth to a dedicated business known as the "Dynamic DataCenter Solutions". This will enhance the potential of NEW Open Source Projects to cater a wide range of services by providing awareness of the "technical side" and the "software side", via a Community Education System. The best way to reach that is to teach the public in detail. DBPC feels the responsibility to bridge the fast pace of technology and traditional businesses. With DBPC, we assist your ideas and turn them into assets fast. For example, because the use of a webmail application (called a mail client) like Roudcube is dependent to your mail server (like hMailServer) which is dependent to your domain and provider of your [domainforemail.com for instance] (if any),  as well as CNAME configuration and others, which is dependent to your ISP that may depend on your hardware, we provide the quick solution for you with a system known as customer education. <a href="#toTop" onclick="getText()">Back to top</a></p>';
		 getServerVision();
    }
  } else {
  document.getElementById('showtime').innerHTML = '<p>&nbsp;</p><p>&nbsp;</p>&nbsp;<p></p><div align ="center"><img src="ajax/loading.gif"></div>';
  }
}
<!--Begin AHAH encapsulation-->
var http4 = getXMLHTTPRequest();
function getServerVision() {
  var myurl = 'serverside/vision_mission.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl+"?rand="+myRand;  
  http4.open("GET", modurl, true);
  http4.onreadystatechange = useMyHttpResponse3;
  http4.send(null);
}

function useMyHttpResponse3() {
   if (http4.readyState == 4) {
    if(http4.status == 200) {
	  var myText = http4.responseText;
	  
      document.getElementById('showSetRightTextID').innerHTML = myText; // Get Data from server
	  changeText('1', 'showsetRightHeadingID');
	  //document.getElementById('leftHeadingAjaxableID').innerHTML ='TITLE';
	  //changeText(1, 'leftHeadingAjaxableID');
    }
  } else {
  document. getElementById('showSetRightTextID').innerHTML = '<p>&nbsp;</p><p>&nbsp;</p><div align ="center"><img src="ajax/loading.gif"></div>';
  }
}
<!--End AHAH encapsulation-->

<!--End Vision and Mission-->

function MM_effectGrowShrink(targetElement, duration, from, to, toggle, referHeight, growFromCenter)
{
	Spry.Effect.DoGrow(targetElement, {duration: duration, from: from, to: to, toggle: toggle, referHeight: referHeight, growCenter: growFromCenter});
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

<!--Text for Prospective Students-->
/*var http2 = getXMLHTTPRequest();
function getServerText33() {
  var myurl = 'ajax/textserver.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl+"?rand="+myRand;  
  http2.open("GET", modurl, true);
  http2.onreadystatechange = useMyHttpResponse;
  http2.send(null);
}

function useMyHttpResponse() {
   if (http2.readyState == 4) {
    if(http2.status == 200) { 
      var mytext = http2.responseText;
      document.getElementById('showtime').innerHTML = mytext;
    }
  } else {
  document. getElementById('showtime').innerHTML = '<p>&nbsp;</p><p>&nbsp;</p>&nbsp;<p></p><div align ="center"><img src="ajax/loading.gif"></div>';
  }
}*/
<!--End Text for Prospective Students-->

<!--Text for Server Map-->
var http3 = getXMLHTTPRequest();
function getServerMap() {
  var myurl = 'map_to_nis2.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl+"?rand="+myRand;  
  http3.open("GET", modurl, true);
  http3.onreadystatechange = useMyHttpResponse2;
  http3.send(null);
}

function useMyHttpResponse2() {
   if (http3.readyState == 4) {
    if(http3.status == 200) {
	  var textnode = document.getElementById('showtime').innerHTML = '<div id="leftHeadingAjaxableID"><strong><a name="vision">MAP TO NIS</a></strong></div><img src="images/bigNISMap.jpg" alt="NIS Map" width="591" height="234" />';
	  var textnode2 = http3.responseText;
      document.getElementById('showRight').innerHTML = textnode2; // Get Data from server
	  document.getElementById('showSetRightTextID').innerHTML = textnode; // Append data to document left
    }
  } else {
  document. getElementById('showtime').innerHTML = '<p>&nbsp;</p><p>&nbsp;</p>&nbsp;<p></p><div align ="center"><img src="ajax/loading.gif"></div>';
  }
}
<!--End Text for Server Map-->