
<!--//--><![CDATA[//><!--

var mrMac = (navigator.userAgent.indexOf('Mac') != -1);
if (!mrMac) {
	sfHover = function() {
		var sfEls = document.getElementById("primary-nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" over";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" over\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);
}



	
function GoTo(e)
{
	if(e.options[e.selectedIndex].value == "" || e.options[e.selectedIndex].value == "0")
	{
	
	}
	else
	{
		document.location.href = "#"+ e.options[e.selectedIndex].value;
	}
}

function ShowFaqPlaceHolder(e)	{
	var s = e.options[e.selectedIndex].value;
	
	if(s.length > 0 && s!="0")
	{
		// Hide all to start with 	
		var oDiv = document.getElementsByTagName("div")	
		for(var x = 0; x<oDiv.length;x++)
		{
			if(oDiv[x].id.indexOf("faq_object_") != -1)
			{
				oDiv[x].style.display= "none";		
			}
		}
		// show the one we need
		var oNeeded = GetMyObjectByID(s.replace(/^\s+|\s+$/g, ''));
		oNeeded.style.display = "block";
	
	}
}

function GetMyObjectByID(itemID)
{
// In the future will need to build in the ability to handle v4 netscape browsers.
	if (document.getElementById) // Good browsers
		return document.getElementById(itemID)
	else if (document.all) // medium browsers
		return document.all[itemID];
		
	// Need to handle v4 browsers in the future.
}

function GoToConfig()
{
	var selected_index = document.forms[0].config.selectedIndex;
	var selected_text = document.forms[0].config.options[selected_index].value;
	if (selected_text.length == 0)
	    return;
	    
  	document.location.pathname = selected_text;
}

function openpop(url)
{
	var newwindow = null;
	newwindow=window.open(url,'name','height=800,width=930, scrollbars=yes');
	if(newwindow != null)
	{
		if (window.focus) {newwindow.focus()}
	}
}

function isUndefined(v) {
    var undef;
    return v===undef;
}

// These defaults should be changed the way it best fits your site
var _POPUP_FEATURES = '';

function raw_popup(url, target, features) {
    // pops up a window containing url optionally named target, optionally having features
    if (isUndefined(features)) features = _POPUP_FEATURES;
    if (isUndefined(target  )) target   = '_blank';
    var theWindow = window.open(url, target, features);
    theWindow.focus();
    return theWindow;
}

function link_popup(src, features) {
    // to be used in an html event handler as in: <a href="..." onclick="link_popup(this,...)" ...
    // pops up a window grabbing the url from the event source's href
    return raw_popup(src.getAttribute('href'), src.getAttribute('target') || '_blank', features);
}

$(document).ready( function() {
    var focusClass = "watermarked-focus"
    var defaultValues = new Array();

    $(".watermarked").each(function(i) {
        var $this = $(this);

        defaultValues[i] = $this.val();

        $this.bind("focus", function() {
            $this.addClass(focusClass);
            if($this.val() == defaultValues[i]) {
                $this.val("");
            }
        });

        $this.bind("blur", function() {			
            if(!($this.val())) {
                $this.removeClass(focusClass);
                $this.val(defaultValues[i]);                
            }
            else if ($this.val() == defaultValues[i]) {
                $this.removeClass(focusClass);
            }
        });
    });
});


//--><!]]>

