	function generateFlash(flashID) {
		var so = new SWFObject("toer/swf/pano.swf", "pano", "980", "460", "9", "#eeefdf");
		so.addVariable("xml_file","toer/pano.php");
		so.addParam("allowFullScreen","true");
		so.addParam("allowScriptAccess","sameDomain");
		so.addParam("bgcolor","#eeefdf");
		so.addParam("wmode", "opaque");
		so.write(flashID);
		//window.document["pano"].focus();
	}
	
	sfHover = function() {
		var sfEls = document.getElementById("nav").getElementsByTagName("li");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}

    var dateFields = 0;
    window.addEvent('domready', function() {
		sfHover();
		
        if ($('emoticons')) {
            $each($$('.emoticon'), function(img) {
                img.addEvent('click', function() {
                    $('message').value += ':'+img.title+':';
                });
            });
            $('emoticons').style['display'] = 'block';
        }

        $$('input.date').forEach(function(input) {
            new DateField(input);
        });		

		var flashID = 'flashcontent';
		if ($(flashID)) {
			generateFlash(flashID);
		}
    });