//
// phalanx.cc global .js v1.0
//
// copyright 2001, phalanx group
// www.phalanx.cc
//

//self.onError=null;

function copyright()
{
	if (confirm('co.ma - content management/editor by phalanx\n\ncopyright 2001 phalanx web management & consulting gmbh.\nhttp://www.phalanx.cc/\n\ndo you want to connect to the phalanx website?\n- press OK to load the site in a new browser window.')) test = window.open('http://www.phalanx.cc/')
}

function BrowserCheck()
{
	var browser = navigator.appName;
	var os = navigator.appVersion;
	if (browser == "Netscape") this.browser = "ns"
	else if (browser == "Microsoft Internet Explorer") this.browser = "ie";
	else this.browser = browser;

	if (os.indexOf("Win") != -1) this.os = "win"
	if (os.indexOf("Mac") != -1) this.os = "mac"
	else this.os = os;

	this.version = parseInt(navigator.appVersion)
	this.win = (this.os=="win")
	this.mac = (this.os=="mac")
	this.ns = (this.browser== "ns" && this.version<5)
	this.gk = (this.browser== "ns" && this.version>=5)
	this.ie = (this.browser== "ie" && this.version>=4)
}

is = new BrowserCheck();

var lockhead = new Array(30)

function locked(thematch) {
	if (lockhead[eval(thematch.id.charAt(3))] == thematch.id) return false;
  	else return true;
}

function relock(thematch,col_1,col_2) {
	if (locked(thematch)) thematch.style.backgroundColor = col_1;
  	else thematch.style.backgroundColor = col_2;
}

function addlock(thematch,col_1,col_2) {
	isassigned = 0;
    if (lockhead[eval(thematch.id.charAt(3))] == thematch.id) isassigned = 1;
	else isassigned = 0;

	if (isassigned == 0) {
		lockhead[eval(thematch.id.charAt(3))] = thematch.id;
		thematch.style.backgroundColor = col_1;
	}
	else {
		lockhead[eval(thematch.id.charAt(3))] = '';
		thematch.style.backgroundColor = col_2;
	}
}
