// /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 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// /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); } // Commented out old survey to make way for IPerceptions survey. // checkCookie(); function resetInput(name, default_txt) { if(name.value == "") { name.value = default_txt; } } function clearInput (name, default_txt) { if (name.value == default_txt) name.value = ""; } // HEADERBOARD function headerBoardText() { var seekerName = getMName(); if (seekerName != null) { document.getElementById("fa-l").innerHTML = "

Your Calling Is Calling

Welcome back, " + seekerName.replace('+',' ') + ". Go to My Monster

It's time to aim higher, reach farther and dream bigger. To approach tomorrow with confidence and daring. And Monster's extensive job database is the ideal place to start. Here you can find not just jobs, but the one job that's perfect for you. So start searching now. And step into a whole new work life.

"; } else { document.getElementById("fa-l").innerHTML = "

Your Calling Is Calling

It's time to aim higher, reach farther and dream bigger. To approach tomorrow with confidence and daring. And Monster's extensive job database is the ideal place to start. Here you can find not just jobs, but the one job that's perfect for you. So start searching now. And step into a whole new work life.

"; } } // SURVEY function checkCookie() { gotsurvey=readCookie('gotsurvey') if (gotsurvey != 'true') { //window.onload=showsurvey; window.onunload=showsurvey; createCookie('gotsurvey','true',30) } } function showsurvey() { var percentgetsurvey = 100; var randomnumber = Math.floor(100*Math.random()+1); if (randomnumber<=percentgetsurvey) { popunder = window.open('http://www.monster.com/survey_popup_www.htm','','scrollbars=no,toolbar=no,menubar=no,location=no,height=250,width=300'); if (popunder) popunder.blur(); window.focus(); } }// /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"; document.getElementById("activetab").value = this.id; return false; } } } } } } } if (window.addEventListener) window.addEventListener("load", initTabs, false); else if (window.attachEvent) window.attachEvent("onload", initTabs); // /js/ie-png.js var transparentImage = "http://media.monster.com/mm/homepage/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="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>"; }else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");} _19=""; _19+=""; var _1d=this.getParams(); for(var key in _1d){_19+="";} var _1f=this.getVariablePairs().join("&"); if(_1f.length>0){_19+="";}_19+="";} 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.majorfv.major){return true;} if(this.minorfv.minor){return true;} if(this.rev /*************************** 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 = "url(http://media.monster.com/mm/homepage/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= 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: "http://media.monster.com/mm/homepage/qs/xpbtn_o.gif", ButtonNormal: "http://media.monster.com/mm/homepage/qs/xpbtn_n.gif", ButtonPressed: "http://media.monster.com/mm/homepage/qs/xpbtn_p.gif", ssWidth: "9px", ssHeight: "9px", isWidth: 9, isHeight: 9, FaceBackgroundColor: "white", ContentBackgroundColor: "white", Cursor: "pointer", FontFamily: "Verdana", FontSize: "11px", FontColor: "#333333" }, AlphaChannel: "http://media.monster.com/mm/homepage/qs/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.setContentWidth(w) } this.ContentWidth = this.Width; //defualt to size of parent this.ContentHeight = ComboBoxSkins.HolderHeight; //default width this.getHeight = function() { return this.ContentHeight; } this.setHeight = function(h) { this.ContentHeight = h; } this.setContentWidth = function(w) { this.ContentWidth = w;} this.Float = "left"; this.CloseBoxes = new Array(); this.closeOnOpen = function(boxes) { this.CloseBoxes = boxes; } 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.ContentWidth + "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(""); //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) { for (i=0; i -1 ) { inside = true; break; } src = src.parentNode; } if (!inside) { CallerObject.MCCOpen(); } } } (this); this.MCCOpen = function(CallerObject) { return function (e) { for (i=0; i< 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 = "Unselect All"; this.Item2Caption = "Close"; 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 0) { for (var j=0; j 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)); //k = 0; //alert(SecNodes.length); for (var k=0; k 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 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;