var vars = [], hash;    
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');     
//for(var i = 0; i < hashes.length; i++){        
	hash = hashes[1].split('=');        
	vars.push(hash[0]);        
	var page = hash[1];    
//}
function flash01()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/nav.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/nav.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300">');
   document.write('</object>\n');
}
function flash02()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="6">\n');
   document.write('<param name="movie" value="swfs/laser.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="wmode" value="transparent"/>\n');
   document.write('<embed src="swfs/laser.swf" wmode="transparent" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="6">');
   document.write('</object>\n');
}
function flash03()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="6">\n');
   document.write('<param name="movie" value="swfs/laserb.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="wmode" value="transparent"/>\n');
   document.write('<embed src="swfs/laserb.swf" wmode="transparent" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="6">');
   document.write('</object>\n');
}
function flash04()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/aboutncbce.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="wmode" value="transparent"/>\n');
   document.write('<embed src="swfs/aboutncbce.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300">');
   document.write('</object>\n');
}
function flash05()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/mempart.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/mempart.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300"></embed>\n');
   document.write('</object>\n');
}
function flash06()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/21st.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/21st.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300"></embed>\n');
   document.write('</object>\n');
}
function flash07()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/govlearn.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/govlearn.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300"></embed>\n');
   document.write('</object>\n');
}
function flash08()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/resources.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="wmode" value="transparent"/>\n');
   document.write('<embed src="swfs/resources.swf" wmode="transparent" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300"></embed>\n');
   document.write('</object>\n');
}
function flash09()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/calendar.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/calendar.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300"></embed>\n');
   document.write('</object>\n');
}
function flash10()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/membership.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/membership.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300"></embed>\n');
   document.write('</object>\n');
}
function flash11()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/contact.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/contact.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300"></embed>\n');
   document.write('</object>\n');
}
function flash12()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="125">');
   document.write('<param name="movie" value="swfs/ftrq.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<param name="wmode" value="transparent"/>\n');
   document.write('<embed src="swfs/ftrq.swf" wmode="transparent"  quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="125">');
   document.write('</object>');
}
function flash13()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="425" height="288">\n');
   document.write('<param name="movie" value="swfs/flv/state/state.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/state/state.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="425" height="288"></embed>\n');
   document.write('</object>\n');
}
function flash14()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="425" height="288">\n');
   document.write('<param name="movie" value="swfs/flv/hs_change/hs_change02.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/hs_change/hs_change02.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="425" height="288"></embed>\n');
   document.write('</object>\n');
}
function flash15()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="425" height="288">\n');
   document.write('<param name="movie" value="swfs/flv/literacy/literacy.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/literacy/literacy.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="425" height="288"></embed>\n');
   document.write('</object>\n');
}
function flash16()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="425" height="288">\n');
   document.write('<param name="movie" value="swfs/flv/our_say/our_say.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/our_say/our_say.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="425" height="288"></embed>\n');
   document.write('</object>\n');
}
function flash17()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="425" height="288">\n');
   document.write('<param name="movie" value="swfs/flv/initiatives/initiatives.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/initiatives/initiatives.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="425" height="288"></embed>\n');
   document.write('</object>\n');
}
function flash18()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="473" height="400">\n');
   document.write('<param name="movie" value="swfs/ncbcenames2.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/ncbcenames2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="473" height="400"></embed>\n');
   document.write('</object>\n');
}
function flash19()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="425" height="288">\n');
   document.write('<param name="movie" value="swfs/flv/leaders_speak/leaders_speak.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/leaders_speak/leaders_speak.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="425" height="288"></embed>\n');
   document.write('</object>\n');
}
function flash20()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="975" height="300">\n');
   document.write('<param name="movie" value="swfs/testflash.swf?section='+page+'">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/testflash.swf?section='+page+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="975" height="300"></embed>\n');
   document.write('</object>\n');
}
function flash21()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="425" height="288">\n');
   document.write('<param name="movie" value="swfs/flv/hs_teachers/having_oursay.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/hs_teachers/having_oursay.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="425" height="288"></embed>\n');
   document.write('</object>\n');
}
function flash22()
{
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="450" height="340">\n');
   document.write('<param name="movie" value="swfs/flv/Webinar01.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/Webinar01.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="450" height="340"></embed>\n');
   document.write('</object>\n');
}
function flash23()
{
	
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="450" height="340">\n');
   document.write('<param name="movie" value="swfs/flv/hiller/hiller.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/hiller/hiller.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="450" height="340"></embed>\n');
   document.write('</object>\n');
}
function flash24()
{
	
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="450" height="340">\n');
   document.write('<param name="movie" value="swfs/flv/cfnc/cfnc.swf">\n');
   document.write('<param name="quality" value="high">\n');
   document.write('<embed src="swfs/flv/cfnc/cfnc.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="450" height="340"></embed>\n');
   document.write('</object>\n');
}
function viewmember2(number){
	
	if(number != 21){
		for(var i=1;i<=21;i++){
			if(i == number){
				//alert(number);
				var viewmem = document.getElementById(i);
				viewmem.style.display = 'block';
			}else{
				var viewmem2 = document.getElementById(i);
				viewmem2.style.display = 'none';
			}
		}
	}else{
		for(var i=1;i<=21;i++){
			
				//alert(number);
				var viewmem = document.getElementById(i);
				viewmem.style.display = 'none';
			
		}
		var viewmem = document.getElementById(21); 
		viewmem.style.display = 'block';
		//alert(number);
	}
}
function autotab(object, destination){
	
if (object.getAttribute && object.value.length == object.getAttribute("maxlength"))
destination.focus()
}
function detailcontactform(email){
	//alert(email);
	//$("#detailcontactform").load("phpincludes/distributor.php");
	var dcf = document.getElementById('detailcontactform');
	dcf.style.display = "block";
	
	dcf.style.zIndex = "2";
	dcf.style.position = "absolute";
	dcf.style.backgroundColor = "#CCCCCC";
	dcf.style.border = "1px solid black";
	dcf.style.width = "auto";
	dcf.style.height = "auto";
	dcf.style.textAlign = "center";
	dcf.style.top= 100;
}
function detailcontactformhide(){
	var dcf = document.getElementById('detailcontactform');
	dcf.style.display = "none";

	
}
function printresult(){
	myWindow = window.open("", "tinyWindow", 'toolbar,scrollbars=1,width=900') 
	myWindow.document.write("<img src=\"http://www.ncbce.org/uploads/images/ERC_Logo_Final.jpg\" border=\"0\" /><br><br>The State Board of Education's overarching goal is that \"...every public school student will graduate from high school, globally competitive for work and postsecondary education and prepared for life in the 21st century.\"Three education priorities have been identified as necessary for students to graduate college and career ready:<ul><li>High expectations for students with appropriate standards, assessments and accountability to support those expectations;</li><li>Quality leadership for every school and every classroom;</li><li>Integration of new education tools to engage students and teachers and teachers in the 21st century learning.</li></ul>NCBCE Education Resource Collaboration is an innovative way for businesses, organizations, and government entities to connect with education resources and priorities in North Carolina. The NCBCE ERC provides the information needed to make the connections to help prepare our students for success and a database that coincides with Governor Perdue's Education Agenda:  Read, Set, Go!<br><br>"+document.getElementById('printarea').innerHTML+"<script language=\"javascript\">window.print()</script>")
	myWindow.document.bgColor="white"
	myWindow.document.close()
}
function viewmember(number){
	
	if(number != 27){
		for(var i=0;i<=26;i++){
			if(i == number){
				//alert(number);
				var viewmem = document.getElementById(i);
				viewmem.style.display = 'block';
			}else{
				var viewmem2 = document.getElementById(i);
				viewmem2.style.display = 'none';
			}
		}
	}else{
		for(var i=0;i<=26;i++){
			
				//alert(number);
				var viewmem = document.getElementById(i);
				viewmem.style.display = 'block';
			
		}
	}
}
//var viewmem2 = document.getElementById(1);
viewmem2.style.display = 'none';

function closedivs(){
	//alert('here');
	for(var i=27;i<=27;i++){
			var viewmem2 = document.getElementById(i);
			viewmem2.style.display = 'none';
	}
}
function closedivs2(){
	//alert('here');
	for(var i=1;i<=20;i++){
			var viewmem = document.getElementById(i);
			viewmem.style.display = 'none';
	}
}
function removeunderline(id){
	
	var cell = document.getElementById(id);
	cell.style.textDecoration='none';
	alert(id);
	
}
function addunderline(id){
	
	var cell = document.getElementById(id);
	cell.style.textDecorationUnderline='true';
	alert(id);
	
}
function checkUrl(){
	var browUrl = document.location.href;
	//document.write (browUrl); 
	if(browUrl == 'http://ncbce.org/'){
		window.location = "http://www.ncbce.org"
	} 
}
function startPopUp(data){
	z = setTimeout("eventPopUp("+data+");",50);
	
}
<!--        Script by hscripts.com          -->
<!--        copyright of HIOX INDIA         -->
<!-- more scripts @ http://www.hscripts.com -->


window.onload = init;
function init() {
  if (window.Event) {
    document.captureEvents(Event.MOUSEMOVE);
  }
  document.onmousemove = getXY;
}

function getXY(e) {
  x = (window.Event) ? e.pageX : event.clientX;
  y = (window.Event) ? e.pageY : event.clientY;

  alert(x+":"+y)
}

<!-- Script by hscripts.com -->


function eventPopUp(evnt){
	var node = document.getElementById("eventpopupTable");
	node.style.display = "none";
	//clearTimeout(t);
	if(navigator.appName == "Microsoft Internet Explorer"){
		var xx =  window.event.clientX;
		var yy =  window.event.clientY;
	}
	if(navigator.appName == "Netscape"){
		
		


		
	}
	//var ary = new Array(evnt);
	
	var node = document.getElementById("eventpopupTable");
	var nodeh = node.style.height;
	nodeh = nodeh.replace("px", "");
	var winh = screen.height-300;
	var newy = (yy/winh)*nodeh;
	
    //alert(newy);
	//writeevnt(evnt);
	//evnt = evnt.replace("!||", "<br>");
	//var tevnt = evnt.split("||", "<br>");
	document.getElementById("eventTitles").innerHTML = evnt;
	//alert('here');
	if(node.style.display == "none"){
		//alert(node.style.display);
		node.style.position = "fixed";
		node.style.left = xx+20;
		node.style.top = yy-newy;
		if(navigator.appName == "Netscape"){
		 //document.write('<div id="windowbuttons" style="position:relative;margin-top:-30px;margin-bottom:25px;"></div>');
		 	//alert(node2.style.display);
			//alert(evnt);
		 	node.style.display = "block";
		}
		if(navigator.appName == "Microsoft Internet Explorer"){
				 //document.write('<div id="windowbuttons" style="position:relative;"></div>');
				 //alert(arr2);
				 node.style.display = "block";
				 //node2.style.display = "true";
		}
		
		
	}else{
		node.style.display = "none";
	//alert(node.style.display);
	}
	clearTimeout(z);
	
}
function eventPopDown(){
	clearTimeout(t);
	var node = document.getElementById("eventpopupTable");
	node.style.display = "none";
	
	
}
function startclear(){
	t = setTimeout("closeevents();",400);
}
function cleartime(){
	clearTimeout(t);
}
function closeevents(){
	
	var node = document.getElementById("eventpopupTable");
	node.style.display = "none";
	clearTimeout(t);
	
}
function initialize_map() {
	
	if(GBrowserIsCompatible()) {
		var map_compatible = true;
		//alert(map_compatible);
	}
	
	if( map_compatible ) {
		
		var map = new GMap2(document.getElementById('map'));        
		//var geocoder = new GClientGeocoder();
		//show_address(default_address);
		map.setCenter(new GLatLng(35.957081, -78.908599), 10);
 		map.addControl(new GSmallMapControl());
 		map.addControl(new GMapTypeControl());
		var point = new GLatLng(35.957081, -78.908599)
		map.addOverlay(new GMarker(point));
		show_address(default_address);
	}
}

var map;
var directionsPanel;
var directions;
var startdirections;
function initialize() {
	map = new GMap2(document.getElementById("map"));
	directionsPanel = document.getElementById("directions_div");
	startdirections = document.getElementById("startinput").value;
	
	map.setCenter(new GLatLng(34.830401262867504, -78.02392601966858), 6);
	directions = new GDirections(map, directionsPanel);
	directions.load("" + startdirections + " to 34.830401262867504, -78.02392601966858");
}
/* This function will move the map and shows the address passed to it */
function show_address(address) {
	if( map_compatible && geocoder ) {
		/* Save this address in current_address value to use later if user wants directions */
		current_address = address;		
		geocoder.getLatLng(address,
		function( point ) {
			if( !point ) {
				alert(error_no_map_info);
			} else {
				map.setCenter(point, 13);
				var marker = new GMarker(point);
				map.addOverlay(marker);
				marker.openInfoWindowHtml(address);
			}
		}
		);
	}
	return false;
}

/* Get the directions */
function get_directions() {
	if(GBrowserIsCompatible()) {
		var map_compatible = true;
		//alert(map_compatible);
	}
	if(map_compatible) {
		alert(map_compatible);
		if( document.direction_form.from_address.value == '' ) {
			alert(error_address_empty);
			return false;
		}
		/**
		 * Delete the contents of 'directions' DIV first 
		 * because user might ask for directions more than once.
		**/
		document.getElementById('directions').innerHTML = '';
		
		gdir = new GDirections(map, document.getElementById('directions'));
		
		/* Setup to event handlers, one: when the directions are loaded, two: if there was any error */
		GEvent.addListener(gdir, 'load',  onGDirectionsLoad);
		GEvent.addListener(gdir, 'error', handleErrors);
		
		/* Show the directions */
		set_directions(document.direction_form.from_address.value, current_address);			
	}
	return false;
}

/* This will actually set the directions on the map and loads the direction table */
function set_directions(fromAddress, toAddress) {
gdir.load("from: " + fromAddress + " to: " + toAddress,
			{ "locale": "en" });
}

/* This will handle the errors might happen while retrieving the directions */
function handleErrors(){
	if( gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS )
		alert(error_invalid_address);
	else if( gdir.getStatus().code == G_GEO_SERVER_ERROR )
		alert(error_google_error);
	else if( gdir.getStatus().code == G_GEO_MISSING_QUERY )
		alert(error_address_empty);
	else 
		alert(error_invalid_address);
}

/* This function will be called when the directions are loaded */
function onGDirectionsLoad(){
	/* We will simply scroll down to the directions, but with a little delay so it's loaded */
	// setTimeout('eval(\'window.location = "#directions_table"\;\')', 500); /* Uncomment this line if you need to */
}