// /js/main.js
function initPage()
{
	var nav = document.getElementById("navigation-main");
	if (nav)
	{
		var nodes = nav.getElementsByTagName("li");
		for (var i = 0; i < nodes.length; i++)
		{
				var uls = nodes[i].getElementsByTagName("ul");
				if (uls[0])
				{
					nodes[i]._ul = uls[0];
				}
				nodes[i].onmouseover = function ()
				{
					if (this.className.indexOf("hover") == -1)
					{
						this.className += " hover";
					}
				}
				nodes[i].onmouseout = function ()
				{
					this.className = this.className.replace(" hover", "");
				}
		}
	}
}

if (window.attachEvent && !window.opera) {
	window.attachEvent("onload", initPage);
}

function setInput(obj, default_txt) {
    if(obj.value == "") {
        obj.value = default_txt;
    } else {
        if(obj.value == default_txt){
            obj.value = "";
        }
    }
}
function clearInput(obj, default_txt) {
    if(obj.value == default_txt){
        obj.value = "";
    }

}

function resetInput(obj, default_txt) {
    if(obj.value == "") {
        obj.value = default_txt;
    } 
}

function clearJSFields()
{
	if (document.getElementById("q").value != "") setInput(document.getElementById("q"), "Stichwörter (z.B. Ingenieur, IT)");
	if (document.getElementById("cnme").value != "") setInput(document.getElementById("cnme"), "Bitte geben Sie einen Ort an");
	if (document.getElementById("zip").value != "") setInput(document.getElementById("zip"), "5-stellige Postleitzahl eingeben");

	var tab1 = document.getElementById("t1");
	var tab2 = document.getElementById("t2");
	var tab3 = document.getElementById("t3");

	if (tab1.className.indexOf("active") == -1)
	{
		document.getElementById("cnme").value = "";
	}

	if (tab2.className.indexOf("active") == -1)
	{
		document.getElementById("zip").value = "";
		document.getElementById("rad").selectedIndex = 1; // might seem that this line is redundant because of last line, but is not, think!
	}

	if (tab3.className.indexOf("active") == -1)
	{
		tviewLoc.Menu.Item1.onclick();
	}

	if (document.getElementById("rad").selectedIndex == 0) document.getElementById("rad").selectedIndex = 1;
}// /js/tabs.js
function initTabs()
{
	var sets = document.getElementsByTagName("div");
	for (var i = 0; i < sets.length; i++)
	{
		if (sets[i].className.indexOf("tabset") != -1)
		{
			var tabs = [];
			var links = sets[i].getElementsByTagName("a");
			for (var j = 0; j < links.length; j++)
			{
				if (links[j].className.indexOf("tab") != -1)
				{
					tabs.push(links[j]);
					links[j].tabs = tabs;

					if (links[j].className.indexOf("active") != -1)
					{
						var c = document.getElementById(links[j].href.substr(links[j].href.indexOf("#") + 1));
						if (c)
							c.style.display = "block";
					}

					links[j].onclick = function ()
					{
						var c = document.getElementById(this.href.substr(this.href.indexOf("#") + 1));
						if (c)
						{
							//reset all tabs
							for (var i = 0; i < this.tabs.length; i++)
							{
								document.getElementById(this.tabs[i].href.substr(this.tabs[i].href.indexOf("#") + 1)).style.display = "none";
								this.tabs[i].className = this.tabs[i].className.replace("active", "");
							}
							this.className += " active";
							c.style.display = "block";
							return false;
						}
					}
				}
			}
		}
	}
}

if (window.addEventListener)
	window.addEventListener("load", initTabs, false);
else if (window.attachEvent)
	window.attachEvent("onload", initTabs);
// /js/ie-png.js
var transparentImage = "/docs/images/transparent.gif";

function fixTrans()
{
	if (typeof document.body.style.maxHeight == 'undefined') {

	var imgs = document.getElementsByTagName("img");
	
	for (i = 0; i < imgs.length; i++)
	{	
		if (imgs[i].src.indexOf(transparentImage) != -1)
		{
			return;
		}

		if (imgs[i].src.indexOf(".png") != -1)
			{
				var src = imgs[i].src;
				imgs[i].src = transparentImage;
				imgs[i].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
			}
		}	
	}
}

if (document.all && !window.opera)
	attachEvent("onload", fixTrans);// /js/swfobject.js
/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;
// /js/NEW_header.js
<!--//--><![CDATA[//><!--

  //The hover function for the main navigation
  sfHover = function() {
/*  	var sfEls = document.getElementById("inMainNav").getElementsByTagName("LI");
  	for (var i=0; i<sfEls.length; i++) {
  		//if(sfEls[i].id != "mn-tab1") - removed to fix ie6 error on first navigation
  		//{
  			sfEls[i].onmouseover=function() {
  				this.className+=" sfhover";
  			}
  			sfEls[i].onmouseout=function() {
  				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
  			}
  		//}
  	}*/
  }
  if (window.attachEvent) window.attachEvent("onload", sfHover);

  //The new window function called by all pages
  var newwindow;
  function popit(url,winHeight,winWidth){
  	newwindow=window.open(url,null,"height=" + winHeight + ",width=" + winWidth + ",status=yes,toolbar=no,menubar=no,location=no,resizable=yes");
  	if (window.focus) {
  		newwindow.focus()
  	}
  }

  //Clears the search box.
  function CheckSearch(searchControl, defaultText)
  	{
  		if (searchControl.value == defaultText)
  		{
  			searchControl.value = "";
  		}
  	}

//--><!]]>

/***************************
Additional functions to keep top level elements highlighted
on secondary nav roll-over
***************************/
function showTopLevelHighlight(e) {
    var topLi, topA;

    if (e["target"]) {
        topLi = e["target"].parentNode.parentNode.parentNode;
    } else if (e["srcElement"]) {
        topLi = e["srcElement"].parentNode.parentNode.parentNode;
    }

	//e.style.height = "22px"

    topA = topLi.getElementsByTagName("A")[0];

	topA.style.backgroundColor = "transparent";
    topA.style.backgroundImage = "/docs/images/hover_Tab_left.gif";
    topA.style.backgroundRepeat = "no-repeat";
    topA.style.backgroundPositionX = "left";
    topA.style.backgroundPositionY = "top";
}

function hideTopLevelHighlight(e) {
    var topLi, topA;

    if (e["target"]) {
        topLi = e["target"].parentNode.parentNode.parentNode;
    } else if (e["srcElement"]) {
        topLi = e["srcElement"].parentNode.parentNode.parentNode;
    }

    topA = topLi.getElementsByTagName("A")[0];

    topA.style.backgroundImage = "";
}

function initTopLevelHighlightEvents() {
/*    var isDom2 = (window.addEventListener) ? true : false;

    var mainNavUl = document.getElementById("inMainnavigation");
    var topLevels = mainNavUl.getElementsByTagName("LI");
    var secondLevelLinks;
    var i, j;

    for (i = 0; i < topLevels.length; i++) {
        if (topLevels[i].getElementsByTagName("UL").length == 0) continue;

        secondLevelLinks = topLevels[i].getElementsByTagName("UL")[0].getElementsByTagName("A");

        for (j = 0; j < secondLevelLinks.length; j++) {
            if (isDom2) {
                secondLevelLinks[j].addEventListener("mouseover", showTopLevelHighlight, false);
                secondLevelLinks[j].addEventListener("mouseout", hideTopLevelHighlight, false);
            } else {
                secondLevelLinks[j].attachEvent("onmouseover", showTopLevelHighlight);
                secondLevelLinks[j].attachEvent("onmouseout", hideTopLevelHighlight);
            }
        }
    }*/
}

var temp_onload = window.onload;
window.onload = function ()
{
   //Are there any exising onload functions?
   //NO
   if (typeof temp_onload != "function")
   {
      initTopLevelHighlightEvents();
   }
   //YES
   else
   {
      temp_onload();
      initTopLevelHighlightEvents();
   }
}// /js/namespaces/system.js
function _System()
{
	String.prototype.Trim = function() {
		return this.replace(/^\s+|\s+$/g,"");
	}

	String.prototype.LTrim = function() {
		return this.replace(/^\s+/,"");
	}

	String.prototype.RTrim = function() {
		return this.replace(/\s+$/,"");
	}

	String.prototype.Contains = function(somestring)
	{
		return (this.indexOf(somestring) != -1 ? true : false);
	}

	String.prototype.Trunc = function(len)
	{
		
		return this.substring(0, len) + (this.length > len ? "..." : "");
		
	}
}

function _XML()
{
	this.selectSingleNode = function (XmlDocument, Xpath)
	{
		if (System.OS.Browser == BT_IE)
		{
			return XmlDocument.selectSingleNode(Xpath);
		} else {
			try
			{
				var XResult = XmlDocument.evaluate(Xpath, XmlDocument, null, XPathResult.ANY_TYPE, null);
				var result = XResult.iterateNext();
				result.text = result.textContent;
				return result;
			}
			catch (e)
			{
				return null;
			}
		}
	}

	this.selectNodes = function(XmlDocument, Xpath)
	{
		if (System.OS.Browser == BT_IE)
		{
			return XmlDocument.selectNodes(Xpath);
		} else {
			try
			{
				var XResult = XmlDocument.evaluate(Xpath, XmlDocument, null, XPathResult.ANY_TYPE, null);
				if (XResult != null)
				{
					var result = new Array();
					var item = XResult.iterateNext();
					
					while(item != null)
					{
						item.text = item.textContent;
						result.push(item);
						item = XResult.iterateNext();
					}
					return result;
				} else return null;
			}
			catch (e)
			{
				return null;
			}
		}
	}

	this.HttpRequest = function()
	{
		var request = null;
		if (System.OS.Browser == BT_IE)
		{
			request = new ActiveXObject("Microsoft.XMLHTTP");
		} else {
			request = new XMLHttpRequest();
		}
		

		return request;
	}

	this.LoadXml = function(request, filename, readystatefunc)
	{
		//var request = this.HttpRequest();
		request.onreadystatechange = readystatefunc;
		request.open("GET", filename, true);
		request.send(null);
	}
}


System = new _System();
_System.prototype.Xml = new _XML();
// /js/namespaces/dom.js
/**************************
** System.DOM namespace
**
** Rev Date: 27 Nov 2007
** Prog: Gabriel Nica
**************************/

_System.prototype.DOM = new function()
{
	/*

	Generic HELPER functions

	*/




	// Return DOM element using a string ID
	this.ObjPointer = function (Obj) {
		if (typeof Obj == "object")
		{
			return Obj;
		} else return document.getElementById(Obj);
	}

	// Generate a unique ID string used to create elements at runtime
	// Parameter is optional. If not provided, returns "objXXX", XXX number

	this.uniqueID = function(optionalBaseString) {
		var base = "";
		var uidcounter = 0;

		if (typeof optionalBaseString != "undefined")
		{
			base = optionalBaseString;
		} else base = "obj";

		var uidcounter=0;

		while (document.getElementById(base + uidcounter) != null) uidcounter++;

		return (base + uidcounter);
	}

	this.findPosX = function(obj) {
		var curleft = 0;
		if (obj.offsetParent) {
			while (1) {
				curleft+=obj.offsetLeft;
				if (!obj.offsetParent) {
					break;
				}
				obj=obj.offsetParent;
			}
		} else if (obj.x) {
			curleft+=obj.x;
		}
		return curleft;
	}

	this.findPosY = function(obj) {
		var curtop = 0;
		if (obj.offsetParent) {
			while (1) {
				curtop+=obj.offsetTop;
				if (!obj.offsetParent) {
					break;
				}
				obj=obj.offsetParent;
			}
		} else if (obj.y) {
			curtop+=obj.y;
		}
		return curtop;
	}

	this.getAbsoluteDivs = function()
	{
		var arr = new Array();
		var all_divs = document.body.getElementsByTagName("DIV");
		var j = 0;

		for (i = 0; i < all_divs.length; i++)
			if (all_divs.item(i).style.position=='absolute')
			{
				arr[j] = all_divs.item(i);
				j++;
			}

		return arr;
	}

	this.bringToFront = function(obj)
	{
		var divs = System.DOM.getAbsoluteDivs();
		var max_index = 0;
		var cur_index;

		// Compute the maximal z-index of
		// other absolute-positioned divs
		for (i = 0; i < divs.length; i++)
		{
			var item = divs[i];
			if (item == obj ||
				item.style.zIndex == '')
				continue;

			cur_index = parseInt(item.style.zIndex);
			if (max_index < cur_index)
			{
				max_index = cur_index;
			}
		}

		obj.style.zIndex = max_index + 1;
	}



	/*

	CLASS Handling functions

	*/

	this.AddClass = function (Obj, NewClassName)
	{
		Obj = System.DOM.ObjPointer(Obj);
		sClass = Obj.className;
		if (!sClass.Contains(NewClassName))
		{
			sClass = sClass.RTrim() + " " + NewClassName;
			Obj.className = sClass;
			return true;
		} else return false;
	}

	this.RemoveClass = function (Obj, OldClassName)
	{
		Obj = System.DOM.ObjPointer(Obj);
		sClass = Obj.className;
		if (sClass.Contains(OldClassName))
		{
			var regExp = new RegExp(OldClassName + "\s*", "gi");
			sClass = sClass.replace(regExp, "").Trim();
			Obj.className = sClass;
			return true;
		} else return false;
	}

	this.ToggleClass = function(Obj, ClassName)
	{
		Obj = System.DOM.ObjPointer(Obj);
		sClass = Obj.className;
		if (sClass.Contains(ClassName))
		{
			return System.DOM.RemoveClass(Obj, ClassName);
		} else return System.DOM.AddClass(Obj, ClassName);
	}

	this.ReplaceClass = function(Obj, ClassName, NewClassName)
	{
		Obj = System.DOM.ObjPointer(Obj);
		sClass = Obj.className;
		if (sClass.Contains(ClassName))
		{
			if (System.DOM.RemoveClass(Obj, ClassName))
				return System.DOM.AddClass(Obj, NewClassName);
		} else return false;
	}


	/*

	--- END --- CLASS Handling functions

	*/


	/*

	STYLE Handling functions

	*/

	this.AddStyle = function (Obj, NewStyleName)
	{
		Obj = System.DOM.ObjPointer(Obj);
		NewStyleName = NewStyleName.toUpperCase();
		sStyle = Obj.style.cssText.toUpperCase();
		if (!sStyle.Contains(NewStyleName))
		{
			sStyle = sStyle.RTrim() + "; " + NewStyleName;
			Obj.style.cssText = sStyle;
			return true;
		} else return false;
	}

	this.RemoveStyle = function (Obj, OldStyleName)
	{
		Obj = System.DOM.ObjPointer(Obj);
		OldStyleName = OldStyleName.toUpperCase();
		sStyle = Obj.style.cssText.toUpperCase();
		if (sStyle.Contains(OldStyleName))
		{
			var regExp = new RegExp(OldStyleName + "\s*", "gi");
			sStyle = sStyle.replace(regExp, "").Trim();
			Obj.style.cssText = sStyle;
			return true;
		} else return false;
	}

	this.ToggleStyle = function(Obj, StyleName)
	{
		StyleName = StyleName.toUpperCase();
		Obj = System.DOM.ObjPointer(Obj);
		sStyle = Obj.style.cssText.toUpperCase();
		if (sStyle.Contains(StyleName))
		{
			return System.DOM.RemoveStyle(Obj, StyleName);
		} else return System.DOM.AddStyle(Obj, StyleName);
	}

	this.ReplaceStyle = function(Obj, StyleName, NewStyleName)
	{
		NewStyleName = NewStyleName.toUpperCase();
		StyleName = StyleName.toUpperCase();
		Obj = System.DOM.ObjPointer(Obj);
		sStyle = Obj.style.cssText.toUpperCase();
		if (sStyle.Contains(StyleName))
		{
			if (System.DOM.RemoveStyle(Obj, StyleName))
				return System.DOM.AddStyle(Obj, NewStyleName);
		} else return false;
	}


	/*

	--- END --- CLASS Handling functions

	*/

}

// /js/namespaces/os.js
// Constants
BT_MAJOR_VERSION = 0;
BT_COMPLETE_VERSION = 1;

BT_IE = new CBrowserType("Internet Explorer");
BT_FIREFOX = new CBrowserType("Firefox");
BT_OPERA = new CBrowserType("Opera");
BT_SAFARI = new CBrowserType("Safari");
BT_OTHER = new CBrowserType("Other");


// Objects

_System.prototype.OS = new function()
{
	this.Browser = (new CBrowserType()).Detect();
	this.Browser.Analyze(BT_COMPLETE_VERSION);
}

function CBrowserType(SID)
{
	if (arguments.length == 0)
	{
		this.Detect = function() {

			var ieVersion;
			/*@cc_on
			   /*@if (@_jscript_version == 5.7)
					ieVersion = 7;
				@elif (@_jscript_version == 5.6)
					ieVersion = 6;
				@elif (@_jscript_version == 5.5)
					ieVersion = 5.5;
				@elif (@_jscript_version == 5.1)
					ieVersion = 5.1;
				@elif (@_jscript_version == 5)
					ieVersion = 5;
				@elif (@_jscript_version == 4)
					ieVersion = 4;
				@else @*/
				  ieVersion = 0;
			   /*@end
			@*/
			BT_IE.Version = ieVersion;
			return (ieVersion > 0 ? BT_IE : (typeof document.all == "object" ? BT_OPERA : (document.getElementById ? (document.implementation.createDocument.prototype ? BT_FIREFOX : BT_SAFARI) : BT_OTHER)));
		}
	} else {

		// Protected
		this.SID = SID;

		// Public
		this.toString = function() { return this.SID; };
		this.Analyze = function(versionType) {

			// Get Version

			// Internet Explorer

			if (typeof this.Version == "undefined")
			{
				if (this == BT_OPERA)
				{
					if(window.opera) {
						if(window.opera.version) {
							this.Version = window.opera.version();
						} else {
							this.Version = navigator.userAgent.substring(navigator.userAgent.indexOf("Opera/")+6, navigator.userAgent.indexOf(" ("));
						}
					}
				} else if (this == BT_FIREFOX)
				{
					this.Version = navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox/")+8);
				} else if (this == BT_SAFARI)
				{
					this.Version = navigator.userAgent.substring(navigator.userAgent.indexOf("Version/")+8, navigator.userAgent.indexOf("Safari"));

				} else this.Version = "Unknown";

				if (versionType == BT_MAJOR_VERSION)
				{
					if (this.Version.indexOf(".") != -1 && this.Version.lastIndexOf(".") != -1)
					{
						if (this.Version.indexOf(".") != this.Version.lastIndexOf("."))
						{
							this.Version = this.Version.substring(0, this.Version.indexOf(".")+2) * 1;
						}
					}
				}
			}

		}
	}
}// /js/namespaces/nsmonster.js
function CMonsterComponents()
{

}

function CjsUI()
{
	this.Components = new CMonsterComponents();
}

function CMonster()
{
	this.jsUI = new CjsUI();
}

Monster = new CMonster();
// /js/namespaces/components/basic.js

/* Function to mimic inheritance */

function IContainer(Caller)
{
	Caller.ContentHolder = null;
	Caller.Container = null;


	Caller.Skin = null;
	Caller.Parameters = new Array();

	Caller.AddParameter = function(TopObject)
	{
		return function(ParamName, ParamValue) {
			TopObject.Parameters.push(new Parameter(ParamName, ParamValue));
		}
	} (Caller);


	Caller.GetParameter = function(TopObject)
	{
		return function(ParamName) {
			TopObject.Parameters.push(new Parameter(ParamName, ParamValue));
		}
	} (Caller);

}// /js/namespaces/components/combobox.js
function ComboGlobals()
{


	this.MCCImagesPath = "http://media.monster.com/mm/cup/";


}

var MCCGlobals = new ComboGlobals();

function locationsVisible()
{
	return this.DropDownContent.style.visibility == "hidden" ? false : true;
}




var MCC__SELECTANDGO = 0;
var MCC__SELECTANDSTOP = 1;

function CComboBox(DropDownButton, ContentDiv, ComboFaceDiv, ComboCaptionText, GETVariableName, GETVariableINPUTID, AnchorName, Behaviour)
{
	this.hasEvent = false;
	this.AnchorName = AnchorName;

	this.DropDownBtn = document.getElementById(DropDownButton);
	this.DropDownContent = document.getElementById(ContentDiv);
	this.ComboFace = document.getElementById(ComboFaceDiv);
	this.ComboFace.parentNode.style.position = "absolute";
	this.ComboCaption = document.getElementById(ComboCaptionText);
	this.VariableName = GETVariableName;
	this.InputId = GETVariableINPUTID;

	this.LocationsVisible = locationsVisible;

	this.BtnMouseOver = function (CallerObject)
						{
							return function ()
							{
								CallerObject.DropDownBtn.src = MCCGlobals.MCCImagesPath + "xpbtn_o.gif";
								CallerObject.DropDownBtn.parentNode.parentNode.className = "xpborder-focus combowidth comboline";
							}
						} (this);

	this.BtnMouseOut = function (CallerObject)
						{
							return function ()
							{
								CallerObject.DropDownBtn.src = MCCGlobals.MCCImagesPath + "xpbtn_n.gif";
								CallerObject.DropDownBtn.parentNode.parentNode.className = "xpborder combowidth comboline";
							}
						} (this);

	this.BtnMouseDown = function (CallerObject)
						{
							return function ()
							{
								CallerObject.DropDownBtn.src = MCCGlobals.MCCImagesPath + "xpbtn_p.gif";
							}
						} (this);

	this.BtnMouseUp = function (CallerObject)
						{
							return function (e)
							{
								CallerObject.DropDownBtn.src = MCCGlobals.MCCImagesPath + "xpbtn_o.gif";

								if (System.OS.Browser == BT_IE)
								{
									window.event.cancelBubble = true;
									if (CallerObject.hasEvent)
									{
										document.body.detachEvent("onclick", CallerObject.ClickHandler);
									} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
								} else {
									if (CallerObject.hasEvent)
									{
										document.body.removeEventListener("click", CallerObject.ClickHandler, false);
									} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
									e.stopPropagation();
								}

								CallerObject.hasEvent = !CallerObject.hasEvent;

								if (CallerObject.LocationsVisible())
								{
									CallerObject.DropDownContent.style.display = "none";

									CallerObject.DropDownContent.style.visibility = "hidden";
									CallerObject.DropDownContent.style.overflow = "hidden";
								} else {
									CallerObject.DropDownContent.style.visibility = "visible";
									CallerObject.DropDownContent.style.overflow = "auto";
									CallerObject.DropDownContent.style.display = "block";
								}
							}
						} (this);

	this.ClickHandler = function (CallerObject)
						{
							return function(mevent)
							{
								src = System.OS.Browser == BT_IE ? window.event.srcElement : mevent.srcElement;
								if (!src) src = System.OS.Browser == BT_IE ? window.event.target : mevent.target;

								inside = false;
								while (src.nodeName != "BODY")
								{
									if (src.id.indexOf("MCC__") > -1)
									{
										inside = true;
										break;
									}
									src = src.parentNode;
								}

								if (!inside)
								{

									CallerObject.MCCOpen();
								}
							}

						} (this);


	this.MCCOpen = function(CallerObject)
					{
						return function (e)
						{
							if (System.OS.Browser == BT_IE)
							{
								window.event.cancelBubble = true;
								if (CallerObject.hasEvent)
								{
									document.body.detachEvent("onclick", CallerObject.ClickHandler);
								} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
							} else {
								if (CallerObject.hasEvent)
								{
									document.body.removeEventListener("click", CallerObject.ClickHandler, false);
								} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
								if (e) e.stopPropagation();
							}

							CallerObject.hasEvent = !CallerObject.hasEvent;



							if (CallerObject.LocationsVisible())
							{
								CallerObject.DropDownContent.style.display = "none";

								CallerObject.DropDownContent.style.visibility = "hidden";
								CallerObject.DropDownContent.style.overflow = "hidden";
							} else {
								CallerObject.DropDownContent.style.visibility = "visible";
								CallerObject.DropDownContent.style.overflow = "auto";
								CallerObject.DropDownContent.style.display = "block";
							}


						}
				} (this);






	this.LineMouseOver = function ()
						{
							if (this.style.backgroundColor != "#669999")
							{
								this.style.backgroundColor = "#316ac5";
								this.childNodes[0].className = this.childNodes[0].className.replace("combotext", "combotexthover" )
				
							}
						}

	this.LineMouseOut = function ()
						{
							if (this.style.backgroundColor != "#669999")
							{
								this.style.backgroundColor = "#ffffff";
								this.childNodes[0].className = this.childNodes[0].className.replace("combotexthover", "combotext")
							}
						}

	this.LineClick = function(CallerObject)
					{
						return function ()
						{
							Href = this.childNodes[0].href;
							this.childNodes[0].href = "#" + CallerObject.AnchorName;
							CallerObject.ComboCaption.innerHTML = this.innerHTML;
							ttle = CallerObject.ComboCaption.childNodes[0];
							ttle.onmouseover = null;
							ttle.onmouseout = null;
							ttle.onclick = CallerObject.MCCOpen;

							ttle.style.backgroundColor = "#ffffff";
							ttle.style.color = "#333333";

							if (System.OS.Browser == BT_IE)
							{

								if (CallerObject.hasEvent)
								{
									document.body.detachEvent("onclick", CallerObject.ClickHandler);
								} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
							} else {
								if (CallerObject.hasEvent)
								{
									document.body.removeEventListener("click", CallerObject.ClickHandler, false);
								} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
							}

							CallerObject.hasEvent = !CallerObject.hasEvent;

							if (CallerObject.LocationsVisible())
							{
								CallerObject.DropDownContent.style.display = "none";

								CallerObject.DropDownContent.style.visibility = "hidden";
								CallerObject.DropDownContent.style.overflow = "hidden";
							} else {
								CallerObject.DropDownContent.style.visibility = "visible";
								CallerObject.DropDownContent.style.overflow = "auto";
								CallerObject.DropDownContent.style.display = "block";
							}

							document.getElementById(CallerObject.InputId).value = Href;

						}
					} (this);

	this.LineClickGo = function ()
	{
		Href = this.childNodes[0].href;
		window.location.assign(Href);
	}




	this.DropDownBtn.onmouseover = this.BtnMouseOver;
	this.DropDownBtn.onmouseout = this.BtnMouseOut;
	this.DropDownBtn.onmousedown = this.BtnMouseDown;


	this.ComboFace.onmouseover = this.BtnMouseOver;
	this.ComboFace.onmouseout = this.BtnMouseOut;


	this.ComboCaption.onmouseover = this.BtnMouseOver;
	this.ComboCaption.onmouseout = this.BtnMouseOut;

	this.ComboFace.onclick = this.MCCOpen;
	this.ComboCaption.onclick = this.MCCOpen;
	this.DropDownBtn.onclick = this.BtnMouseUp;

	this.DropDownBtn.style.cursor = "pointer";
	this.DropDownContent.style.visibility = "hidden";
	this.DropDownContent.style.overflow = "hidden";
	this.DropDownContent.style.display = "none";
	//this.DropDownContent.onscroll = MCCOnComboScroll;

	divs = this.DropDownContent.getElementsByTagName("div");

	for (i=0; i<divs.length; i++)
	{
		if (divs[i].className == "comboline linewidth combotext")
		{
			if (divs[i].childNodes[0].href.indexOf("#") == -1)
			{
				divs[i].style.cursor = "pointer";
				divs[i].style.width = "183px";
				divs[i].onmouseover = this.LineMouseOver;
				divs[i].onmouseout = this.LineMouseOut;
				if (Behaviour == MCC__SELECTANDGO)
				{
					divs[i].onclick = this.LineClickGo;
				} else divs[i].onclick = this.LineClick;
				divs[i].onmouseover();
				divs[i].onmouseout();
			} else divs[i].childNodes[0].style.cursor = "default"
		}
	}

	input = document.createElement("INPUT");
	input.setAttribute('type', 'hidden');
    input.setAttribute('id', this.InputId);
	input.setAttribute('name', this.VariableName);
	this.DropDownContent.appendChild(input);

}




////////////////
// This function scrolls exactly one item up or down
// so that the last item in the list is not partially shown
// - Buggy on IE
///////////////
function MCCOnComboScroll()
{
	var x = this.scrollTop;
	var y = 17;

	fpart = Math.round(((x / 17) * 10) % 10);
	ipart = Math.floor(x/17);

	if (fpart >= 5)
	{
		this.scrollTop = 17 * (ipart+1);
	} else this.scrollTop = 17 * ipart;
}
// /js/namespaces/components/jcombobox.js
var ComboBoxSkins = {
	XPRoyale : {
		Border: "1px solid #7f9db9",
		BorderOver: "1px solid #335ea8",
		ButtonOver: "/docs/images/xpbtn_o.gif",
		ButtonNormal: "/docs/images/xpbtn_n.gif",
		ButtonPressed: "/docs/images/xpbtn_p.gif",
		ssWidth: "9px",
		ssHeight: "9px",
		isWidth: 9,
		isHeight: 9,
		FaceBackgroundColor: "white",
		ContentBackgroundColor: "white",
		Cursor: "pointer",
		FontFamily: "Verdana",
		FontSize: "11px",
		FontColor: "#333333"		
	},
	AlphaChannel: "/docs/images/spacer.png",
	MaxHeight : 17,
	HolderHeight: 120,
	ApplyIEFilter: function (El)
	{
		El.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + El.src + "', sizingMethod='image')";
		El.src = this.AlphaChannel;
	}
}; // ComboBoxSkins class



function CjComboBox(Skin)
{
	IContainer(this); // Inherit IContainer

	this.Skin = Skin;
	this.hasEvent = false; // Has the outside click event handler = false

	this.Width = 200; //default width
	this.getWidth = function() { return this.Width; }
	this.setWidth = function(w) { this.Width = w; }

	this.ContentHeight = ComboBoxSkins.HolderHeight; //default width
	this.getHeight = function() { return this.ContentHeight; }
	this.setHeight = function(h) { this.ContentHeight = h; }

	this.Float = "left";

	this.setFloat = function(f)
	{
		this.Float = f;
	}

	this.Caption = "";
	this.FirstCaption = "";
	this.setCaption = function(newText) {
		this.Caption = newText;
		if (this.ComboCaption)
		{
			this.ComboCaption.innerHTML = this.Caption;
		}

		if (this.FirstCaption == "")
		{
			this.FirstCaption = this.Caption;
		}
	}

	this.AttachTo = function (Container)
	{
		this.Container = Container;
		// override default AttachTo
		if (typeof this.Container == "string")
		{
			System.DOM.ObjPointer(this.Container).appendChild(this.ComboFace);
			System.DOM.ObjPointer(this.Container).appendChild(this.ContentHolder);
		}
	}

	this.RepositionHolder = function()
	{
		//this.ContentHolder.style.top = (System.DOM.findPosY(this.ComboFace) + ComboBoxSkins.MaxHeight + 1) + "px";
		//this.ContentHolder.style.left = System.DOM.findPosX(this.ComboFace) + "px";
		//if (System.OS.Browser != BT_IE) this.ContentHolder.style.top = "21px"
		//this.ContentHolder.style.zIndex = "1000000";
	}

	this.Create = function()
	{
		this.ComboFace = document.createElement("div");
		this.ComboFace.id = System.DOM.uniqueID("CjComboBox");
		this.ComboFace.style.width = this.Width + "px";
		this.ComboFace.style.height = ComboBoxSkins.MaxHeight + "px";
		this.ComboFace.style.border = this.Skin.Border;
		this.ComboFace.style.lineHeight = ComboBoxSkins.MaxHeight + "px";
		this.ComboFace.style.backgroundColor = this.Skin.FaceBackgroundColor;
		this.ComboFace.style.cursor = this.Skin.Cursor;
		this.ComboFace.style.zIndex = 10000;
		this.ComboFace.style.styleFloat = this.Float;
		this.ComboFace.style.cssFloat = this.Float;



		// Create Caption bar
		this.ComboCaption = document.createElement("div");
		this.ComboCaption.id = System.DOM.uniqueID("jComboCaption");
		this.ComboCaption.style.FontFamily = this.Skin.FontFamily;
		this.ComboCaption.style.FontSize = this.Skin.FontSize;
		this.ComboCaption.style.FontColor = this.Skin.FontColor;
		this.ComboCaption.style.styleFloat = "left";
		this.ComboCaption.style.cssFloat = "left";
		this.ComboCaption.style.backgroundColor = this.Skin.FaceBackgroundColor;
		this.ComboCaption.style.cursor = this.Skin.Cursor;
		this.ComboCaption.style.lineHeight = ComboBoxSkins.MaxHeight + "px";
		this.ComboCaption.style.paddingLeft = "2px";
		this.setCaption(this.Caption);


		// Create Button Holder
		this.ComboButtonHolder = document.createElement("div");
		this.ComboButtonHolder.style.styleFloat = "right";
		this.ComboButtonHolder.style.cssFloat = "right";
		this.ComboButtonHolder.style.width = ComboBoxSkins.MaxHeight + "px";
		this.ComboButtonHolder.style.height = ComboBoxSkins.MaxHeight + "px";

		// Create Button
		this.ComboButton = document.createElement("img");
		this.ComboButton.alt = this.Caption;
		this.ComboButton.id = System.DOM.uniqueID("jComboButton");
		this.ComboButton.src = this.Skin.ButtonNormal;

		var brclr = document.createElement("br");
			brclr.style.clear = "both";
			brclr.style.cssFloat = "none";
			brclr.style.styleFloat = "none";

		this.ContentHolder = document.createElement("div");
		this.ContentHolder.style.height = this.ContentHeight + "px";
		this.ContentHolder.style.width = this.Width + "px";
		this.ContentHolder.style.backgroundColor = this.Skin.ContentBackgroundColor;
		this.ContentHolder.style.border = this.Skin.Border;
		this.ContentHolder.style.position = "absolute";
		this.ContentHolder.style.overflow = "hidden";
		this.ContentHolder.style.overflowX = "hidden";
		this.ContentHolder.style.display = "none";
		this.ContentHolder.style.zIndex = this.ComboFace.style.zIndex - 1;
		this.ContentHolder.style.clear = "both";
		this.ContentHolder.id = System.DOM.uniqueID("jComboContentHolder");



		this.ComboFace.appendChild(this.ComboCaption);
		this.ComboButtonHolder.appendChild(this.ComboButton);

		this.ComboFace.appendChild(this.ComboButtonHolder);
		this.ComboFace.appendChild(brclr);
		//var markerid=System.DOM.uniqueID("marker");
		//document.write("<span id='" + markerid + "' style='display: none'></span>");

		//System.DOM.ObjPointer(markerid).parentNode.appendChild(this.ComboFace);
		document.body.appendChild(this.ComboFace);

		this.RepositionHolder();
		document.body.appendChild(this.ContentHolder);
		System.DOM.bringToFront(this.ComboFace);
		//document.body.removeChild(this.ComboFace);
		//document.body.appendChild(this.ComboFace);




		// Adding Events
		this.ComboButton.onmouseover = this.BtnMouseOver;
		this.ComboButton.onmouseout = this.BtnMouseOut;
		this.ComboButton.onmousedown = this.BtnMouseDown;
		this.ComboButton.onclick = this.BtnMouseUp;

		this.ComboFace.onmouseover = this.BtnMouseOver;
		this.ComboFace.onmouseout = this.BtnMouseOut;
		this.ComboFace.onclick = this.MCCOpen;

		this.ComboCaption.onmouseover = this.BtnMouseOver;
		this.ComboCaption.onmouseout = this.BtnMouseOut;
		this.ComboCaption.onclick = this.MCCOpen;

	}

	this.ContentVisible = function() { return this.ContentHolder.style.display == "none" ? false : true; }
	this.ShowContent = function() { this.RepositionHolder(); this.ContentHolder.style.display = "block"; }
	this.HideContent = function() { this.ContentHolder.style.display = "none"; }

	this.BtnMouseOver = function (CallerObject)
						{
							return function ()
							{
								CallerObject.ComboButton.src = CallerObject.Skin.ButtonOver;
								CallerObject.ComboFace.style.border = CallerObject.Skin.BorderOver;
							}
						} (this);

	this.BtnMouseOut = function (CallerObject)
						{
							return function ()
							{
								CallerObject.ComboButton.src = CallerObject.Skin.ButtonNormal;
								CallerObject.ComboFace.style.border = CallerObject.Skin.Border;
							}
						} (this);

	this.BtnMouseDown = function (CallerObject)
						{
							return function ()
							{
								CallerObject.ComboButton.src = CallerObject.Skin.ButtonPressed;
							}
						} (this);

	this.BtnMouseUp = function (CallerObject)
						{
							return function (e)
							{
								CallerObject.ComboButton.src = CallerObject.Skin.ButtonOver;

								if (System.OS.Browser == BT_IE)
								{
									window.event.cancelBubble = true;
									if (CallerObject.hasEvent)
									{
										document.body.detachEvent("onclick", CallerObject.ClickHandler);
									} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
								} else {
									if (CallerObject.hasEvent)
									{
										document.body.removeEventListener("click", CallerObject.ClickHandler, false);
									} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
									e.stopPropagation();
								}

								CallerObject.hasEvent = !CallerObject.hasEvent;

								if (CallerObject.ContentVisible())
								{
									CallerObject.HideContent();
								} else {
									CallerObject.ShowContent();
								}
							}
						} (this);

	this.ClickHandler = function (CallerObject)
						{
							return function(mevent)
							{
								src = System.OS.Browser == BT_IE ? window.event.srcElement : mevent.srcElement;
								if (!src) src = System.OS.Browser == BT_IE ? window.event.target : mevent.target;

								inside = false;
								while (src.nodeName != "BODY")
								{
									if (src.id.indexOf("jCombo") > -1)
									{
										inside = true;
										break;
									}
									src = src.parentNode;
								}

								if (!inside)
								{

									CallerObject.MCCOpen();
								}
							}

						} (this);


	this.MCCOpen = function(CallerObject)
					{
						return function (e)
						{
							if (System.OS.Browser == BT_IE)
							{
								window.event.cancelBubble = true;
								if (CallerObject.hasEvent)
								{
									document.body.detachEvent("onclick", CallerObject.ClickHandler);
								} else document.body.attachEvent("onclick", CallerObject.ClickHandler);
							} else {
								if (CallerObject.hasEvent)
								{
									document.body.removeEventListener("click", CallerObject.ClickHandler, false);
								} else document.body.addEventListener("click", CallerObject.ClickHandler, false);
								if (e) e.stopPropagation();
							}

							CallerObject.hasEvent = !CallerObject.hasEvent;



							if (CallerObject.ContentVisible())
							{
								CallerObject.HideContent();

							} else {
								CallerObject.ShowContent();
							}


						}
				} (this);

}


// /js/namespaces/components/treeview.js
var TreeViewSkins = {
	XPRoyale : {
		Collapsed: "/docs/images/treeview-collapsed-sign.png",
		Expanded: "/docs/images/treeview-expanded-sign.png",
		Normal: "/docs/images/radio-unselected.png",
		NormalHover: "/docs/images/radio-over.png",
		NormalPressed: "/docs/images/radio-unselected-pressed.png",
		Selected: "/docs/images/radio-selected.png",
		SelectedHover: "/docs/images/radio-selected-over.png",
		SelectedPressed: "/docs/images/radio-selected-pressed.png",
		Disabled: "/docs/images/radio-disabled.png",
		ssWidth: "9px",
		ssHeight: "9px",
		isWidth: 9,
		isHeight: 9,
		ContentBackgroundColor: "white",
		Cursor: "pointer",
		FontFamily: "Verdana",
		FontSize: "11px",
		FontColor: "#333333"
	},

	VistaAero : {
		Collapsed: "/docs/images/vtreeview-collapsed-sign.png",
		Expanded: "/docs/images/vtreeview-expanded-sign.png",
		Normal: "/docs/images/vradio-unselected.png",
		NormalHover: "/docs/images/vradio-over.png",
		NormalPressed: "/docs/images/vradio-over.png",
		Selected: "/docs/images/vradio-selected.png",
		SelectedHover: "/docs/images/vradio-unselected-pressed.png",
		SelectedPressed: "/docs/images/vradio-selected.png",
		Disabled: "/docs/images/vradio-disabled.png",
		ssWidth: "9px",
		ssHeight: "9px",
		isWidth: 9,
		isHeight: 9
	},

	AlphaChannel: "/docs/images/spacer.png",
	MaxHeight : 17,
	ApplyIEFilter: function (El)
	{
		El.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + El.src + "', sizingMethod='image')";
		El.src = this.AlphaChannel;
	}
}; // TreeViewSkins class

var TextNodeSkins = {
	XPRoyale : {
		ContentBackgroundColor: "white",
		Cursor: "pointer",
		FontFamily: "Verdana",
		FontSize: "11px !important",
		FontColor: "#333333",
		Height: 17,
		Padding: "0px 0px 0px 3px",
		OnOverStyle: "text-decoration: underline",
		OnOutStyle: "text-decoration: none"
	},

	VistaAero : {
		ContentBackgroundColor: "white",
		Cursor: "pointer",
		FontFamily: "Verdana",
		FontSize: "11px",
		FontColor: "#333333",
		Height: 17,
		Padding: "0px 0px 0px 3px",
		OnOverStyle: "text-decoration: underline",
		OnOutStyle: "text-decoration: none"
	},

	AlphaChannel: "/docs/images/spacer.png",
	MaxHeight : 17,
	ApplyIEFilter: function (El)
	{
		El.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + El.src + "', sizingMethod='image')";
		El.src = this.AlphaChannel;
	}
}; // TextNodeSkins class

var TVCheckBoxMenuSkins = {
	XPRoyale : {
		ContentBackgroundColor: "#f2f2f2",
		Cursor: "pointer",
		FontFamily: "Verdana",
		FontSize: "11px",
		FontColor: "#4B590E",
		Height: 17,
		Padding: "0px 3px 0px 3px",
		OnOverStyle: "text-decoration: underline",
		OnOutStyle: "text-decoration: none"
	},

	VistaAero : {
		ContentBackgroundColor: "white",
		Cursor: "pointer",
		FontFamily: "Verdana",
		FontSize: "11px",
		FontColor: "#333333",
		Height: 17,
		Padding: "0px 3px 0px 3px",
		OnOverStyle: "text-decoration: underline",
		OnOutStyle: "text-decoration: none"
	},

	AlphaChannel: "/docs/images/spacer.png",
	MaxHeight : 17,
	ApplyIEFilter: function (El)
	{
		El.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + El.src + "', sizingMethod='image')";
		El.src = this.AlphaChannel;
	}
}; // TVCheckBoxMenuSkins class

function Parameter(paramName, paramValue)
{
	this.Name = paramName;
	this.Value = paramValue;
}



function CTextNode(Skin, Caption, Variable, TreeView)
{
	this.Caption = "";
	this.Element = null;
	this.Skin = Skin;
	this.Value = "";
	this.TreeView = TreeView;
	this.Variable = Variable;

	this.setCaption = function (caption)
	{
		this.Caption = caption;
		if (this.Element != null)
		{
			this.Element.innerHTML = this.Caption;
			this.Element.title = this.Caption;
		}
	}

	this.setValue = function(newValue)
	{
		this.Value = newValue;
		//this.Checkbox.value = this.Value;
	}

	this.Create = function()
	{
		this.Element = document.createElement("div");
		this.Element.style.padding = this.Skin.Padding;
		this.Element.style.styleFloat = "left";
		this.Element.style.cssFloat = "left";
		//this.Element.style.height = this.Skin.Height + "px";
		this.Element.style.height = "auto";
		this.Element.style.width = "200px";
		this.Element.style.fontFamily = this.Skin.FontFamily;
		this.Element.style.fontSize = this.Skin.FontSize;
		this.Element.style.color = this.Skin.FontColor;
		this.Element.style.cursor = this.Skin.Cursor;
		this.Element.style.lineHeight = this.Skin.Height + "px";
		this.Element.innerHTML = this.Caption;
		this.Element.title = this.Caption;

		// Events
		this.Element.onmouseover = function(Caller) { return function() { System.DOM.AddStyle(Caller.Element, Caller.Skin.OnOverStyle); } } (this)
		this.Element.onmouseout = function(Caller) { return function() { System.DOM.ReplaceStyle(Caller.Element, Caller.Skin.OnOverStyle, Caller.Skin.OnOutStyle); } } (this)

	}

	if (typeof Caption != "undefined")
	{
		this.Caption = Caption;
		this.Create();
	}
}

function CCheckBoxTextNode(Skin, Caption, Variable, TreeView)
{
	this.Caption = "";
	this.Element = null;
	this.Skin = Skin;
	this.Value = "";
	this.TreeView = TreeView;
	this.Checkbox = null;
	this.Variable = Variable;

	this.FirstCaption = "";
	this.setCaption = function (caption)
	{
		this.Caption = caption;
		if (this.Element != null)
		{
			this.Element.innerHTML = this.Caption;
		}
		if (this.FirstCaption == "")
		{
			this.FirstCaption = this.Caption;
		}
	}

	this.setValue = function(newValue)
	{
		this.Value = newValue;
		this.Checkbox.name = this.Variable + '_' + this.Value;
		this.Checkbox.id = this.Variable + '_' + this.Value;
	}

	this.Create = function()
	{
		this.Element = document.createElement("div");
		this.Element.style.padding = this.Skin.Padding;
		this.Element.style.styleFloat = "left";
		this.Element.style.cssFloat = "left";
		//this.Element.style.height = this.Skin.Height + "px";
		this.Element.style.height = "auto";
		this.Element.style.fontFamily = this.Skin.FontFamily;
		//this.Element.style.fontSize = this.Skin.FontSize;
		this.Element.style.color = this.Skin.FontColor;
		this.Element.style.cursor = this.Skin.Cursor;
		this.Element.style.lineHeight = this.Skin.Height + "px";
		this.Element.style.width = this.TreeView.Container.Width + "px";
		this.Element.style.width = "200px";
		this.Element.style.overflow = "hidden";

		this.Checkbox = document.createElement("input");
		this.Checkbox.type = "checkbox";
		this.Checkbox.style.styleFloat = "left";
		this.Checkbox.style.cssFloat = "left";
		this.Checkbox.style.border = "none";
		this.Checkbox.style.lineHeight = this.Skin.Height + "px";
		//this.Checkbox.value = this.Value;
		//this.Checkbox.name = this.Variable;

		this.TextNode = document.createElement("div");
		this.TextNode.style.padding = this.Skin.Padding;
		this.TextNode.style.styleFloat = "left";
		this.TextNode.style.cssFloat = "left";
		//this.TextNode.style.height = this.Skin.Height + "px";
		this.TextNode.style.height = "auto";
		this.TextNode.style.fontFamily = this.Skin.FontFamily;
		//this.TextNode.style.fontSize = this.Skin.FontSize;
		this.TextNode.style.color = this.Skin.FontColor;
		this.TextNode.style.cursor = this.Skin.Cursor;
		this.TextNode.style.lineHeight = this.Skin.Height + "px";
		this.TextNode.style.width = "auto";
		this.TextNode.innerHTML = this.Caption;
		this.TextNode.title = this.Caption;

		this.Element.appendChild(this.Checkbox);
		this.Element.appendChild(this.TextNode);



		// Events
		this.TextNode.onmouseover = function(Caller) { return function() { System.DOM.AddStyle(Caller.TextNode, Caller.Skin.OnOverStyle); } } (this);
		this.TextNode.onmouseout = function(Caller) { return function() { System.DOM.ReplaceStyle(Caller.TextNode, Caller.Skin.OnOverStyle, Caller.Skin.OnOutStyle); } } (this);
		this.TextNode.onclick = function(Caller) { return function() {
			Caller.Checkbox.checked = !Caller.Checkbox.checked;

			Caller.Checkbox.onclick();

			} } (this);

		this.Checkbox.onclick = function(Caller) { return function() {
			var inc = (Caller.Checkbox.checked ? 1 : (Caller.TreeView.Tag == 0 ? 0 : -1));
			if (Caller.TreeView.Tag == "")
			{
				Caller.TreeView.Tag = 0;
			}
			Caller.TreeView.Tag += inc;
			if (Caller.TreeView.Tag < 21)
			{
				if (Caller.TreeView.Tag == 0)
				{
					Caller.TreeView.Container.setCaption(Caller.TreeView.Container.FirstCaption);
				} else Caller.TreeView.Container.setCaption(Caller.TreeView.Tag + Caller.TreeView.SelectionChange);
			} else
			{
				Caller.TreeView.Container.setCaption(Caller.TreeView.MaximumSelection);
				Caller.Checkbox.checked = false;
				Caller.TreeView.Tag--;
			}
			} } (this);

	}

	if (typeof Caption != "undefined")
	{
		this.Caption = Caption;
		this.Create();
	}
}

// Custom class for checkbox menu
function CCheckBoxMenu(Skin, TreeView)
{
	this.Item1Caption = "Alle entfernen";
	this.Item2Caption = "Schließen";
	this.Element = null;
	this.Skin = Skin;
	this.TreeView = TreeView;





	this.Create = function()
	{
		this.Item1 = document.createElement("div");
		this.Item1.style.padding = this.Skin.Padding;
		this.Item1.style.styleFloat = "left";
		this.Item1.style.cssFloat = "left";
		this.Item1.style.height = this.Skin.Height + "px";
		this.Item1.style.fontFamily = this.Skin.FontFamily;
		this.Item1.style.fontSize = this.Skin.FontSize;
		this.Item1.style.color = this.Skin.FontColor;
		this.Item1.style.cursor = this.Skin.Cursor;
		this.Item1.style.lineHeight = this.Skin.Height + "px";
		this.Item1.style.backgroundColor = this.Skin.ContentBackgroundColor;
		this.Item1.innerHTML = this.Item1Caption;

		// Events
		this.Item1.onmouseover = function(Caller) { return function() { System.DOM.AddStyle(Caller.Item1, Caller.Skin.OnOverStyle); } } (this);
		this.Item1.onmouseout = function(Caller) { return function() { System.DOM.ReplaceStyle(Caller.Item1, Caller.Skin.OnOverStyle, Caller.Skin.OnOutStyle); } } (this);
		this.Item1.onclick = function(Caller) { return function() {
				for (var i=0; i<Caller.TreeView.rootNode.Count; i++)
				{
					// 1 tier only - to edit in the future (recursive)
					if (Caller.TreeView.rootNode.children[i].Count > 0)
					{

						Caller.TreeView.rootNode.children[i].nodeItem.Checkbox.checked = false;
						Caller.TreeView.rootNode.children[i].nodeItem.Checkbox.onclick();
						for (var j=0; j<Caller.TreeView.rootNode.children[i].Count; j++)
						{
							Caller.TreeView.rootNode.children[i].children[j].nodeItem.Checkbox.checked = false;
							Caller.TreeView.rootNode.children[i].children[j].nodeItem.Checkbox.onclick();
						}

					} else {
						Caller.TreeView.rootNode.children[i].nodeItem.Checkbox.checked = false;
						Caller.TreeView.rootNode.children[i].nodeItem.Checkbox.onclick();
					}

				}
				Caller.TreeView.Container.setCaption(Caller.TreeView.Container.FirstCaption);
			} } (this);

		this.Item2 = document.createElement("div");
		this.Item2.style.padding = this.Skin.Padding;
		this.Item2.style.styleFloat = "right";
		this.Item2.style.cssFloat = "right";
		this.Item2.style.height = this.Skin.Height + "px";
		this.Item2.style.fontFamily = this.Skin.FontFamily;
		this.Item2.style.fontSize = this.Skin.FontSize;
		this.Item2.style.color = this.Skin.FontColor;
		this.Item2.style.cursor = this.Skin.Cursor;
		this.Item2.style.lineHeight = this.Skin.Height + "px";
		this.Item2.style.backgroundColor = this.Skin.ContentBackgroundColor;
		this.Item2.innerHTML = this.Item2Caption;


		// Events
		this.Item2.onmouseover = function(Caller) { return function() { System.DOM.AddStyle(Caller.Item2, Caller.Skin.OnOverStyle); } } (this)
		this.Item2.onmouseout = function(Caller) { return function() { System.DOM.ReplaceStyle(Caller.Item2, Caller.Skin.OnOverStyle, Caller.Skin.OnOutStyle); } } (this);
		this.Item2.onclick = function(Caller) { return function() { Caller.TreeView.Container.MCCOpen(); } } (this);

		this.Element = document.createElement("div");
		this.Element.style.width = "100%";
		this.Element.style.height = this.Skin.Height + "px";
		this.Element.style.backgroundColor = this.Skin.ContentBackgroundColor;

		this.Element.appendChild(this.Item1);
		this.Element.appendChild(this.Item2);
	}
}


function CTreeViewNode(nodeValue, nodeItem)
{
	this.nodeValue = (typeof nodeValue == "undefined" ? null : nodeValue);
	this.nodeItem = (typeof nodeItem == "undefined" ? null : nodeItem);

	if (this.nodeItem != null)
	{
		if (this.nodeItem.Value == "") // exists but not set
		{
			this.nodeItem.setValue(this.nodeValue);
		}
	}
	this.children = null;
	this.Count = 0; // children count
	this.nodeParent = null;

	this.AddNode = function(nodeValue, nodeItem)
	{
		var t = new CTreeViewNode(nodeValue, nodeItem);
		t.nodeParent = this;
		if (this.children == null)
		{
			this.children = new Array();
		}

		this.children.push(t);
		this.Count = this.children.length;
		return t;
	}


} // CTreeViewNode()

function CTreeView(Skin)
{
	IContainer(this); //Inherit IContainer

	// CheckBox Specific
	this.ContentArea = null;
	this.Menu = null;
	//

	this.Skin = Skin;
	this.rootNode = null;
	this.Nodes = new Array();
	//temp
	this.Xpath = "";
	this.setXPath = function(s)
	{
		this.Xpath = s;
	}

	this.IdJoin = ".";
	this.setIdJoin = function(s)
	{
		this.IdJoin = s;
	}

	this.SelectionChange = " items selected";
	this.MaximumSelection = "Maximum items selected";

	//temp - may not be the best way
	this.Tag = ""; // all purpose variable

	this.AttachTo = function (Container)
	{
		this.Container = Container;
		//
	}

	this.Create = function()
	{
		this.Menu = new CCheckBoxMenu(TVCheckBoxMenuSkins.XPRoyale, this);
		this.Menu.Create();

		this.ContentArea = document.createElement("div");
		if (this.Container != null)
		{
			this.ContentArea.style.height = this.Container.ContentHeight  + "px";
		}
		this.ContentArea.style.width = "100%";
		this.ContentArea.style.backgroundColor = this.Skin.ContentBackgroundColor;

		this.ContentHolder = document.createElement("div");
		this.ContentHolder.style.height = (this.Container.ContentHeight-TVCheckBoxMenuSkins.XPRoyale.Height) + "px";
		this.ContentHolder.style.width = "100%";
		this.ContentHolder.style.backgroundColor = this.Skin.ContentBackgroundColor;
		this.ContentHolder.style.overflow = "scroll";
		this.ContentHolder.style.overflowX = "hidden";
		this.ContentHolder.style.overflowY = "scroll";

		this.ContentArea.appendChild(this.ContentHolder);
		this.ContentArea.appendChild(this.Menu.Element);

		this.Container.ContentHolder.appendChild(this.ContentArea);
		this.rootNode = new CTreeViewNode();

		this.CollapsedImg = document.createElement("img");
		this.CollapsedImg.style.width = this.Skin.ssWidth;
		this.CollapsedImg.style.height = this.Skin.ssHeight;
		this.CollapsedImg.style.verticalAlign = "middle";
		//this.CollapsedImg.style.position = "relative";
		//this.CollapsedImg.style.top = (System.OS.Browser == BT_IE ? "20%" : "25%");
		this.CollapsedImg.style.marginTop = "5px";
		//this.CollapsedImg.style.mar = "3px";
		this.CollapsedImg.src = this.Skin.Collapsed;


		this.ExpandedImg = document.createElement("img");
		this.ExpandedImg.style.width = this.Skin.isWidth;
		this.ExpandedImg.style.height = this.Skin.isHeight;
		this.ExpandedImg.style.verticalAlign = "middle";
		this.ExpandedImg.style.position = "relative";
		this.ExpandedImg.style.top = "25%";
		this.ExpandedImg.src = this.Skin.Expanded;

		this.Collapsed = document.createElement("div");
		//this.Collapsed.style.width = TreeViewSkins.MaxHeight + "px";
		this.Collapsed.style.height = TreeViewSkins.MaxHeight + "px";
		this.Collapsed.style.cssFloat = "left";
		this.Collapsed.style.styleFloat = "left";
		this.Collapsed.style.lineHeight = TreeViewSkins.MaxHeight + "px";
		this.Collapsed.style.margin = "0px 3px 0px 3px";
		this.Collapsed.appendChild(this.CollapsedImg.cloneNode(true));

		this.Expanded = document.createElement("div");
		this.Expanded.style.height = TreeViewSkins.MaxHeight + "px";
		this.Expanded.style.cssFloat = "left";
		this.Expanded.style.styleFloat = "left";
		this.Expanded.style.lineHeight = TreeViewSkins.MaxHeight + "px";
		this.Expanded.style.margin = "0px 3px 0px 3px";
		this.Expanded.appendChild(this.ExpandedImg.cloneNode(true));

	}

	this.PopulateFromXml = function(filename, variablename)
	{
		var request = System.Xml.HttpRequest();
		request.open("GET", filename, false);
		request.send(null);
		var xml = request.responseXML;
//		request.responseXML.setProperty("SelectionLanguage", "XPath");

		var TopNodes = System.Xml.selectNodes(xml, "//Items/Item");


		for (var i=0; i<TopNodes.length; i++)
		{
			var nodeTop = "";
			//alert(nodes[i].attributes[0].nodeValue);

			// title node
			var nodeVal;
			if (System.OS.Browser == BT_IE)
			{
				nodeVal = TopNodes[i].childNodes[0].nodeValue.Trim();
			} else {
				if (TopNodes[i].childNodes.length > 1)
				{
					nodeVal = TopNodes[i].childNodes[1].nodeValue.Trim(); // skip one node
				} else {
					nodeVal = TopNodes[i].childNodes[0].nodeValue.Trim(); // default to zero
				}

			}



			var SecNodes = System.Xml.selectNodes(xml, "//Items/Item[@id=" + TopNodes[i].attributes[0].nodeValue + "]/SubItem");

			if (SecNodes.length > 0)
			{

				//nodeTop = this.rootNode.AddNode(TopNodes[i].attributes[0].nodeValue, new CTextNode(TextNodeSkins.XPRoyale, nodeVal, variablename, this));
				// changed 2008-05-13 Andreas von Studnitz
				// display checkbox on top categories too
				nodeTop = this.rootNode.AddNode(TopNodes[i].attributes[0].nodeValue, new CCheckBoxTextNode(TextNodeSkins.XPRoyale, nodeVal, variablename, this));

				//k = 0;
				//alert(SecNodes.length);
				for (var k=0; k<SecNodes.length; k++)
				{
					nodeTop.AddNode(SecNodes[k].attributes[0].nodeValue, new CCheckBoxTextNode(TextNodeSkins.XPRoyale, SecNodes[k].text, variablename, this));
				}


			} else {
				nodeTop = this.rootNode.AddNode(TopNodes[i].attributes[0].nodeValue, new CCheckBoxTextNode(TextNodeSkins.XPRoyale, nodeVal, variablename, this));

			}

		}



	}

	this.RenderDeep = function(dNode, level)
	{
		var divC = document.createElement("div");
		divC.style.width = "100%";
		divC.style.paddingLeft = (9 * 2 + 4) + "px";

		for (var i=0; i<dNode.Count; i++)
		{
			var brclr = document.createElement("br");
			brclr.style.clear = "both";
			brclr.style.cssFloat = "none";
			brclr.style.styleFloat = "none";

			var img = this.Collapsed.cloneNode(true);

			if (dNode.children[i].Count > 0)
			{
				divC.appendChild(img);
			}

			divC.appendChild(dNode.children[i].nodeItem.Element);

			if (i < dNode.Count || dNode.children[i].Count > 0)
			{
				divC.appendChild(brclr);
			}

			if (dNode.children[i].Count > 0)
			{
				var divDeeper = this.RenderDeep(dNode.children[i], level+1);
				divDeeper.style.display = "none";
				divC.appendChild(divDeeper);
				img.onclick = function (Caller) { return function() {
					if (this.firstChild.src.indexOf(Caller.Skin.Expanded) > -1)
					{
						this.firstChild.src = Caller.Skin.Collapsed;
						this.nextSibling.nextSibling.nextSibling.style.display = "none";
					} else {
						this.firstChild.src = Caller.Skin.Expanded;
						this.nextSibling.nextSibling.nextSibling.style.display = "block";
					}
				} } (this);
			}
			//this.ContentHolder.appendChild(dNode.children[i].nodeItem.Element);
		}

		return divC;
	}



	this.Render = function()
	{


		var divC = document.createElement("div");
		divC.style.width = "100%";
		divC.style.paddingLeft = "0px";
		divC.style.paddingTop = "3px";

		var i = 0;

		for (i=0; i<this.rootNode.Count; i++)
		{
			var brclr = document.createElement("br");
			brclr.style.clear = "both";
			brclr.style.cssFloat = "none";
			brclr.style.styleFloat = "none";

			var img = this.Collapsed.cloneNode(true);

			if (this.rootNode.children[i].Count > 0)
			{
				divC.appendChild(img);
			}

			divC.appendChild(this.rootNode.children[i].nodeItem.Element);
			if (i < this.rootNode.Count-1 || this.rootNode.children[i].Count > 0)
			{
				divC.appendChild(brclr);
			}
			if (this.rootNode.children[i].Count > 0)
			{
				var divDeeper = this.RenderDeep(this.rootNode.children[i], 1);
				divDeeper.style.display = "none";
				divC.appendChild(divDeeper);
				img.onclick = function (Caller) { return function() {
					if (this.firstChild.src.indexOf(Caller.Skin.Expanded) > -1)
					{
						this.firstChild.src = Caller.Skin.Collapsed;
						this.nextSibling.nextSibling.nextSibling.style.display = "none";
					} else {
						this.firstChild.src = Caller.Skin.Expanded;
						this.nextSibling.nextSibling.nextSibling.style.display = "block";
					}
				} } (this);
			}
		}

		this.ContentHolder.appendChild(divC);
	}


} // CTreeView()// /js/namespaces/components/components.js

//CMonsterComponents.prototype.RadioButton = CRadioButton;
//CMonsterComponents.prototype.RadioSet = CRadioSet;
CMonsterComponents.prototype.ComboBox = CComboBox;
//CMonsterComponents.prototype.TreeView = CTreeView;
//CMonsterComponents.prototype.TreeViewNode = CTreeViewNode;
CMonsterComponents.prototype.jComboBox = CjComboBox;
CMonsterComponents.prototype.TreeView = CTreeView;
CMonsterComponents.prototype.TreeViewNode = CTreeViewNode;

// /js/cookiereader.js

// this sets a cookie. simply here in this file to test
// the monster fla.
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

//this reads the cookie. necessary (or similar replacement)
// to have getMName functioning
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

//just to erase for testing purposes
function eraseCookie(name) {
	createCookie(name,"",-1);
}


//gets cookie based on name (hard coded here)
//if finds cookie, looks for "fi=xxxx", returning
//xxxx as name, otherwise, null.
function getMName() {
	var cookieString = readCookie('AdCtx');
	
	if (cookieString) {
		var reg = /fi=([^&]*)\&/;
		var args = reg.exec(cookieString);
		firstName = args[1];
		
		if (firstName) {
			return decodeURI(firstName);
		} else {
			return null;
		}
		
		
		
	} else {
		
		return null;
	}
	
	
	
	
}
//cookie expected as:
//"AdCtx"  values are: at=0&dcpc=01460&ge=2&dcel=6&fi=Dana&moc=101400&dccl=12&mil=0&state=40&uid=19821705

