var config = {
	'URL_DEV': 'dev.digiknow'
}


$(function(){
	
});


/*
 *Name: isDevSession()
 *Function: checks to see if working from DEV server
 */
function isDevSession() {
	var url = new String(window.location);
	url = url.toLowerCase();

	if ((url.indexOf(config.URL_DEV) > 1) || (url.indexOf("localhost") > 1))
		return true;
	else
		return false;
}

function getHost() {
	var url = new String(window.location);
	url = url.toLowerCase();
	var urlparts = url.split('/');
	var host = urlparts[0];
	
	return host;
}

//USAGE: <a href="#" onclick="MM_openBrWindow('/indianajones/enter/signup.php','','scrollbars=yes,width=590,height=610')">
function MM_openBrWindow(theURL,winName,features){
	window.open(theURL,winName,features);
}

//USAGE: <a href="#" onclick="scbz_pop_up('/indianajones/enter/signup.php',' ','scrollbars=yes,width=650px,height=550px')">
function scbz_pop_up(url, winName, features) {
  if (features == "")
    features = "scrollbars=yes,width=650,height=550";

  if (winName == "")
    winName = "scbz_pop_up";

  var new_window;
  new_window = window.open(url, winName, features);

  if (window.focus)
    new_window.focus();
}

function pageWidth() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.documentElement.clientWidth:null;}
function pageHeight() {return window.innerHeight != null? window.innerHeight: document.body.clientHeight != null? document.documentElement.clientHeight:null;}

function autotab (current, next) {
	if (current.getAttribute && current.value.length == current.getAttribute("maxlength")) {
		next.focus();
	}
}

function toggleBtn() {
	document.getElementById('submit_off').style.display = 'block';
    document.getElementById('submit_on').style.display = 'none';	
	return true;	
}
