/* * CHATEAU ROUX * * Subject to copyright. * * Web Development - LOOKsystems Limited * mailto:info@looksystems.ltd.uk * http://www.looksystems.ltd.uk * */ // DOCUMENT FOCUS function sf() { var e = 0; if (!document.forms.length) return; var myform = document.forms[0]; while (e < myform.elements.length) { if (myform.elements[e].type == "text" || myform.elements[e].type == "textarea") { myform.elements[e].focus(); break; } e++; } } // POPUP SUPPORT var popups = new Object; var popups_child; function popups_initialise() { if (!document.links.length) return; var a = 0; while (a < document.links.length) { var id = document.links[a].id; if (!id) id = document.links[a].className; if (!popups[id]) id = document.links[a].id; if (!popups[id] && id.substring(0, 5) == 'popup') id = 'popup'; if (popups[id] != null || id == 'popup') { var href = document.links[a].href; document.links[a].href = "javascript:popup('"+id+"','"+href+"')"; document.links[a].target = "_self"; } a++; } } function popup(id, url) { var name, features; if (popups != null) features = popups[id]; if (features != null) { name = features[0]; var x = features[1]; var y = features[2]; var w = features[3]; var h = features[4]; if (w < 0) w = window.screen.availWidth; if (h < 0) h = window.screen.availHeight; if (x < 0) x = (window.screen.availWidth - w) / 2; else if (window.screenX != null) x += window.screenX; if (y < 0) y = (window.screen.availHeight - h) / 2; else if (window.screenY != null) y += window.screenY; features = features[5]; if (features != "") features += ","; features += "width="+w+",height="+h; features += ",screenX="+x+",screenY="+y; features += ",left="+x+",top="+y; } if (popups_child != null) { if (popups_child.close != null) popups_child.close(); else name = ''; } popups_child = window.open(url, name, features); if (popups_child != null && popups_child.focus != null) popups_child.focus(); } // OPEN WINDOW function open_fullscreen() { top.window.moveTo(0,0); if (document.all || top.window.resizeTo) { top.window.resizeTo(screen.availWidth, screen.availHeight); } else if (document.layers || document.getElementById) { if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) { top.window.outerHeight = screen.availHeight; top.window.outerWidth = screen.availWidth; } } } // FLASH INTEGRATION function findFlashObject(name) { if (window.document[name]) return window.document[name]; if (navigator.appName.indexOf("Microsoft Internet")==-1) { if (document.embeds && document.embeds[name]) return document.embeds[name]; } return document.getElementById(name); } function update() { var movie = findFlashObject("ChateauRoux"); movie.SetVariable("_level0.WebCart.changed", 1); movie.SetVariable("_level0.ChateauRoux.changed", 1); } // DOCUMENT INITIALISE function init() { popups_initialise(); sf(); }