var Windborne; if (!Windborne) Windborne = {}; if (!Windborne.Utils) Windborne.Utils = {};


function init(vals) {
	

//remove for debugging
//DEBUG(vals,msg);
}


function openWindow(theURL,winName,features) { 
    window.open(theURL,winName,features);
}


function HTML_insert(id,code){
 var ele = Spry.$(id);
 ele.innerHTML=code;
 return;
}


function redirect(theurl) {
  document.location = theurl;
}

function redirect_blank(theurl) {
  window.open(''+theurl);
}



function getVisible(id) {
 var ele = Spry.$(id);
 var visibility_test = ele.style.visibility;
 if(visibility_test == "visible"){
  return true;
 } else {
  return false;
 }
}


function ToggleDiv(id)  {	
  var test_id = getVisible(id);
  var ele = Spry.$(id);
  if(!test_id){
     ele.style.visibility = 'visible';
  } else {
     ele.style.visibility = 'hidden';
  }  
}


function ShowDiv(id)  {
	var e = 'div#' + id;	
    Spry.$$(e).setStyle("visibility: visible;");	
}

function HideDiv(id) {
	var e = 'div#' + id;	
    Spry.$$(e).setStyle("visibility: hidden;");
}


function searchbox(){
	
}
//Backwards compat.   ///////////////////////////////////////
function HideLayer(id)  {
     HideDiv(id);
}

function ShowLayer(id)  {
     ShowDiv(id);
}

function ToggleLayer(id) {
	  ToggleDiv(id);
}

function myoff(id){
      HideDiv(id);
}

function tag_footer(){
var copyright_date = new Date();                    
var copyright_year = copyright_date.getFullYear(); 
var crt = '&copy; ';
var tm = '&#0153; ';
var txtline = ' PLANIT Technology Group. All rights reserved.  Our world revolves around yours.';
var locline = '<br />PLANIT serves clients throughout Virginia, Maryland and Washington, DC. including:<br />Richmond, VA, Virginia Beach, VA, Norfolk, VA and Gaithersburg, MD';
var tagline = '<p>' + crt + copyright_year + txtline + tm + locline + '</p>';
HTML_insert('footer',tagline);
}


function open_SOL_popup(popkey){
  var theURL,popwidth,popheight;
  theURL = "popup_edu.php?solchoice=" + popkey;
  popwidth = 400;
  popheight = 250;  //Set height here if overall height is too much or too little
  
  MM_openBrWindow(theURL,"","scrollbars=yes,resizable=yes,width=" + popwidth + ",height=" + popheight + "");

}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function validate (){

}

///////////////////////////////////////////////////////////
///////////   Debugging  //////////////////////////////////

function myTest() {
	
	
	
	
	
	var vals = '';
    var msg = 'testing something: ' ;
    DEBUG(vals,msg);
}

function DEBUG(vals,message){
	if (vals == undefined || vals == ''){
	   var vals = 'no values passed';	
	}
	if(Spry.is.ie){
		alert('DBG: ' + message + ' ' + valtest);
	}else{
		console.log("DBG: %s %s\n", message, vals);
	}	
}
///////////////////////////////////////////////////////////

