// JavaScript Document
//
// File: common.js
// Desc: Common JavaScript routines
// Vers: 1.0
// Prog: Bruce Koch
// Date: Oct 13, 2009 

function getElm(eID) {
	return document.getElementById(eID);
}

// Calling Prog for get_digits()
//-------------------------------
//myDigits = get_digits(dataString);
//digitsArray = myDigits.split(",");
function get_digits(dataString) {
	var myDigits = "";
	
	myDigits = dataString.get_all_digits() + ",";
	
	return myDigits;
	
}

String.prototype.get_all_digits = function() {
	return this.match(/\d+/g);
}

function launchNews() {
	document.location="news.php";
}

function launchBlog() {
	upperX = 50;			
	upperY = 50;			
	winHeight = 700;		
	winWidth = 950;		
	winParameters = "";	
	winContent = "";
	
	winParameters  = "left="+upperX+",top="+upperY+",screenx="+upperX+",screeny="+upperY;
	winParameters += ",height="+winHeight+",width="+winWidth+",toolbar=yes,titlebar=yes,maximize=yes,";
	winParameters += "location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes";
	
	url = "http://www.settleshotel.com/test_ver2/blog/index.php";

	newwindow=window.open(url,'name',winParameters);
	if (window.focus) {
		newwindow.focus();
	}

}

function launchNewsletter() {
	document.location="sett-signup-form.php";
}

function launchHomePage() {
	document.location="index.php";
}