function loadSignupBox()
{
	$("#sign_up_box").slideToggle("slow");
	$("#sign_in_box").hide();
	document.getElementById('sign1').style.display = 'none';
	document.getElementById('sign2').style.display = 'inline';
	
	return false;
}
function loadSignupBox2()
{
	$("#sign_up_box").slideToggle('slow');
	$("#sign_in_box").hide();
	document.getElementById('sign1').style.display = 'inline';
	document.getElementById('sign2').style.display = 'none';
	return false;
	
}
function loadSigninBox()
{
	$("#sign_in_box").slideToggle('slow');
	$("#sign_up_box").hide();
	document.getElementById('signin1').style.display = 'none';
	document.getElementById('signin2').style.display = 'inline';
	//document.getElementById('sign1').style.display = 'inline';
	//document.getElementById('sign2').style.display = 'none';
	return false;
	
}
function loadSigninBox2()
{
	$("#sign_in_box").slideToggle('slow');
	$("#sign_up_box").hide();
	//document.getElementById('sign_up_box').style.display = 'none';
	document.getElementById('signin2').style.display = 'none';
	document.getElementById('signin1').style.display = 'inline';
	//document.getElementById('sign1').style.display = 'inline';
	//document.getElementById('sign2').style.display = 'none';
	return false;
	
}
function changeDefault(value,obj)
{
	if(value == obj.value)
		obj.value = ''
}
function loadDefault(value,obj)
{
	if(obj.value == '')
		obj.value = value;
}

function loginSubmit1(e,num)
{
	var keynum;
	var keychar;
	var numcheck;
	var url;
		
	if(window.event) // IE
	{
		keynum = e.keyCode;
	}
	else if(e.which) // Netscape/Firefox/Opera
	{
		keynum = e.which;
	}
	if(keynum=='13')
	{
		document.login_top.submit();
	}
}
function loginSubmit()
{
	
	document.login_top.submit();
	//return true;
}
function check()
{
	if(document.login_top.txtuname.value=="")
	{
		alert("Enter EmailAddress");
		document.login_top.txtuname.focus();
		return false;
	}

	if(document.login_top.txtpswd.value=="")
	{
		alert("Enter Password");
		document.login_top.txtpswd.focus();
		return false;
	}
	if(document.login_top.txtuname.value=='  User Id')
	{
		alert("Enter Username");
		document.login_top.txtuname.value="";
		document.login_top.txtuname.focus();
		return false;
	}
	if(document.login_top.txtpswd.value=='  Password'){
		alert("Enter Password");
		document.login_top.txtpswd.value="";
		document.login_top.txtpswd.focus();
		return false;
	}
	return true;
}

function yesFishMember()
{
	document.getElementById("login_popup").style.display = 'inline';
	document.getElementById("member_already_popup").style.display = 'none';
	loadPopup_new();
}

function notFishMember()
{
	location.href = notFishMember_url;
}

function loginfacebook()
{
	FB.Connect.requireSession(function() { location.href = loginfacebook_url });
}

function frmSubmitlogin()
{
	var username = document.getElementById('username').value;
	var password = document.getElementById('password').value;
	
	if(username == '')
	{
		alert("Enter username");
		document.getElementById('username').value = '';
		document.getElementById('username').focus();
		return false;
	}
	if(password == '')
	{
		alert("Enter password");
		document.getElementById('password').value = '';
		document.getElementById('password').focus();
		return false;
	}
	
	document.login_top.txtuname.value = username;
	document.login_top.txtpswd.value = password;
	document.login_top.fbpopup_connect.value = 1;
	document.login_top.action = fb_merge_url;
	document.login_top.submit();
}


function loadPopup_new(posy)
{
	if(popupStatus==0){
		$("#backgroundPopup").css({
			"opacity": "0.7"
		});
		$("#backgroundPopup").fadeIn("slow");
		$("#popupContact").fadeIn("slow");
		
		popupStatus = 1;
	}
	
	var windowWidth = document.body.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	//var center_position x=screen.availWidth/2, y=screen.availHeight/2;
	 if (window.pageYOffset)
        var ScrollTop = window.pageYOffset;
    else
        var ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
			
	var popupWidth = $("#popupContact").width();
		
	if(popupWidth == 0)
		popupWidth = 400;
		
	$("#popupContact").css({
		"position": "absolute",
		"top": ScrollTop+100,
		"left": windowWidth/2-popupWidth/2
		
	});
	
	//only need force for IE6
	//alert(document.documentElement.clientHeight);
	$("#backgroundPopup").css({
		"height": document.documentElement.clientHeight
	});
	$("#backgroundPopup").css({
		"width": windowWidth
	});
}

function closepopup()
{
	
	if(popupStatus==1){
		$("#backgroundPopup").fadeOut("slow");
		$("#popupContact").fadeOut("slow");
		//$("#popupContact1").fadeOut("slow");
		popupStatus = 0;
	}
	
	
}


