d = document; /* function to toggle talk to us panel */ function toggleTalk() { panel_status = (d.getElementById('talk_panel').className == "open") ? 0 : 1; d.getElementById('talk_panel').className = (panel_status == 1) ? "open" : "closed"; d.getElementById('talk_panel').style.height = (panel_status == 1) ? "107px" : "37px"; d.getElementById('talk_panel').style.marginTop = (panel_status == 1) ? "9px" : "83px"; d.getElementById('talk_link').style.backgroundImage = (panel_status == 1) ? "url(/dafiles/Furniture/hw/talk_to_us_close_v2.png)" : "url(/dafiles/Furniture/hw/talk_to_us_open_v2.png)"; } /* toggle latest news / our news on homepage */ function toggleNews(){ rssVisible = (d.getElementById('rss_news_panel').style.display == "none") ? false : true; d.getElementById('rss_news_panel').style.display = (rssVisible) ? "none" : "block"; d.getElementById('our_news_panel').style.display = (rssVisible) ? "block" : "none"; } /*function to replace default text in contact form */ var contactFullnameDefault='First / Last name'; var contactPhoneDefault='Phone / mobile'; var contactEmailDefault='Email'; var contactPreferredContactDefault='Preferred method of contact: email / phone'; var contactMessageDefault='Enter your message'; function toggleContact(el,panel_status) { val = el.value; if(panel_status ==1){ if(val == eval(el.id+"Default")){ el.value = ""; } } else if(panel_status==0) { if(val == "") { el.value = eval(el.id+"Default"); } } } function CreateBookmarkLink(title, url) { if (window.sidebar) { // Mozilla Firefox Bookmark window.sidebar.addPanel(title, url,""); } else if( window.external ) { // IE Favorite window.external.AddFavorite(url, title); } else if(window.opera && window.print) { // Opera Hotlist return true; } } // taken from "/vgn-ext-templating/scripts/common/common.js" // required for SimplePopwin() //Purpose: to set features for a window used by function Popwin. //Params: features- a string of window features function fSet(features) { var features = "location=no,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=no"; return features } // taken from "/vgn-ext-templating/scripts/common/common.js" // required for SimplePopwin() // removes all non-alphanumeric characters // except underscore from the input value function createBrowserSafeName(inputVal) { newString = ""; for (i = 0; i < inputVal.length; i++) { ch = inputVal.substring(i, i+1); if ((ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z") || (ch >= "0" && ch <= "9") || ch == "_") { newString += ch; } } // if the name is empty at this point, we may be dealing with a localized // set of characters in which case we default the name to something generic and single-byte if (newString == "") { newString = "defaultVCMWindow"; } return newString; } // taken from "/vgn-ext-templating/scripts/common/common.js" // required for PlannerCMA toolbar function SimplePopwin(theUrl, winName, features, width, height, isModal, isUnique) { // To get rid of XUL error (in mozilla and firefox) that infects all crossbrowser // codes when we try to set the focus() to a dynamic generated field. var iX = document.createElement("INPUT"); iX.setAttribute("autocomplete","OFF"); var ftrs; if (features == "") { ftrs = fSet(features); } else { ftrs = features; } // escape the windowName in case it has any nonAlphaNumeric or non-underscore // characters winName = createBrowserSafeName(winName); var str = ftrs + ",height=" + height + ",innerHeight=" + height; str += ",width=" + width + ",innerWidth=" + width; if (window.screen) { var sh = screen.availHeight - 30; var sw = screen.availWidth - 10; var txc = (sw - width) / 2; var tyc = (sh - height) / 2; str += ",left=" + txc + ",screenX=" + txc; str += ",top=" + tyc + ",screenY=" + tyc; } if(isModal && supportsShowModal() ) { showModalDialog(theUrl,winName,str,width,height); } else { if (isUnique) { winName = winName + new Date().getTime(); } return window.open(theUrl, winName, str); } }