﻿// JavaScript Document
function SetBackground(bdiv, subdiv, divheight) {
	var reg_height = $(bdiv).height() - divheight;
	$(subdiv).height(reg_height);
	if (reg_height > 0) {
		$(bdiv).css("margin-top", reg_height * (-1));
	} else
		$(bdiv).css("margin-top", "0");
}

$( function() {
	$("#personal-account,#laydown").click( function() {
		$("#personal-layout").css("display", "block");
		$("#closelaydown").css("display", "block");
		// $("a.arrow").css("background","url(../images/downArrow.jpg) no-repeat
		// right 4px");
	});

	$("#closelaydown").click( function() {
		$("#personal-layout").css("display", "none");
		$("#closelaydown").css("display", "none");
		// $("a.arrow").css("background","url(../images/login-arrow.gif)
		// no-repeat right 4px");
	});
	
	//register 3 popuplayers
	//npi popup
	$("#npiNumber").focus(function(){
		var label = $("tr#mouse-tips label.general");
		label.css({"color":"#566F00", "font-weight":"bold"});
		$("#reg-pop").bgiframe().positionBy({
			target: label,
			targetPos: 1,
			elementPos: 3
		}).show();
	});
	$("#npiNumber").blur(function(){
		$("#reg-pop").hide();
		$("tr#mouse-tips label.general").css({"color":"#262626", "font-weight":"normal"});

	});
	//email popup
	$("input[id='registrationProfile.emailAddress'], #userName").focus(function(){
		var label = $("td label.mailAddr");
		label.css({"color":"#566F00", "font-weight":"bold"});
		$("#reg-email-pop").bgiframe().positionBy({
			target: label,
			targetPos: 1,
			elementPos: 3
		}).show();
	});
	$("input[id='registrationProfile.emailAddress'], #userName").blur(function(){
		$("#reg-email-pop").hide();
		$("td label.mailAddr").css({"color":"#262626", "font-weight":"normal"});

	});
	//password popup
	$("#regpassword").focus(function(){
		var label = $("td label.psdPop");
		label.css({"color":"#566F00", "font-weight":"bold"});
		$("#password-pop").bgiframe().positionBy({
			target: label,
			targetPos: 1,
			elementPos: 3
		}).show();
	});
	$("#regpassword").blur(function(){
		$("#password-pop").hide();
		$("td label.psdPop").css({"color":"#262626", "font-weight":"normal"});

	});
	
	//splitter login
	$("#returnforgot").click( function() {
		$("#regforget").css("display", "block");
		$("#reglogin").css("display", "none");
	});

	$("#returnlogin").click( function() {
		$("#reglogin").css("display", "block");
		$("#regforget").css("display", "none");
	});
});
