// /js/main.js 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"), "Enter Keywords (English or Spanish)"); if (document.getElementById("cnme").value != "") setInput(document.getElementById("cnme"), "Escriba la ciudad"); if (document.getElementById("zip").value != "") setInput(document.getElementById("zip"), "Escriba el código postal"); 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 = ""; document.getElementById("sid").selectedIndex = 0; document.getElementById("radcs").selectedIndex = 0; } if (tab2.className.indexOf("active") == -1) { document.getElementById("zip").value = ""; document.getElementById("rad").selectedIndex = 0; } if (tab3.className.indexOf("active") == -1) { tviewLoc.Menu.Item1.onclick(); } } // /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); 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://www.elnuevodia.com/monster/images/xpbtn_o.gif", ButtonNormal: "http://www.elnuevodia.com/monster/images/xpbtn_n.gif", ButtonPressed: "http://www.elnuevodia.com/monster/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: "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.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(""); //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: "http://www.elnuevodia.com/monster/images/treeview-collapsed-sign.png", Expanded: "http://www.elnuevodia.com/monster/images/treeview-expanded-sign.png", Normal: "http://media.monster.com/mm/homepage/qs/xproyale/radio-unselected.png", NormalHover: "http://media.monster.com/mm/homepage/qs/xproyale/radio-over.png", NormalPressed: "http://media.monster.com/mm/homepage/qs/xproyale/radio-unselected-pressed.png", Selected: "http://media.monster.com/mm/homepage/qs/xproyale/radio-selected.png", SelectedHover: "http://media.monster.com/mm/homepage/qs/xproyale/radio-selected-over.png", SelectedPressed: "http://media.monster.com/mm/homepage/qs/xproyale/radio-selected-pressed.png", Disabled: "http://media.monster.com/mm/homepage/qs/xproyale/radio-disabled.png", ssWidth: "9px", ssHeight: "9px", isWidth: 9, isHeight: 9, ContentBackgroundColor: "white", Cursor: "pointer", FontFamily: "Verdana", FontSize: "11px", FontColor: "#333333" }, VistaAero : { Collapsed: "http://media.monster.com/mm/homepage/qs/vista/treeview-collapsed-sign.png", Expanded: "http://media.monster.com/mm/homepage/qs/vista/treeview-expanded-sign.png", Normal: "http://media.monster.com/mm/homepage/qs/vista/radio-unselected.png", NormalHover: "http://media.monster.com/mm/homepage/qs/vista/radio-over.png", NormalPressed: "http://media.monster.com/mm/homepage/qs/vista/radio-over.png", Selected: "http://media.monster.com/mm/homepage/qs/vista/radio-selected.png", SelectedHover: "http://media.monster.com/mm/homepage/qs/vista/radio-unselected-pressed.png", SelectedPressed: "http://media.monster.com/mm/homepage/qs/vista/radio-selected.png", Disabled: "http://media.monster.com/mm/homepage/qs/xproyale/radio-disabled.png", ssWidth: "9px", ssHeight: "9px", isWidth: 9, isHeight: 9 }, AlphaChannel: "http://media.monster.com/mm/homepage/qs/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", 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: "http://media.monster.com/mm/homepage/qs/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: "#AEC350", 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: "http://media.monster.com/mm/homepage/qs/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.Trunc(30); 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.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.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.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.Trunc(24); 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 = "Deselect 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;