<!--

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
};

function setUserName() {
	var el = $('#cLoginUserName');
	var cValue = "User Name";
	if (el.val() == cValue) {
		el.val('');	
	} else if (jQuery.trim(el.val()) == '') {
		el.val(cValue);
	};
};


function showFeature(iID) {
	// Remove all formatting;
		$(".featuresNav").removeClass("featuresNavActive");
		$(".features").hide();
	// Update display for focus item;
		$("#featuresNav" + iID).addClass("featuresNavActive");
		$("#features" + iID).show();
};

function orderNow() {
	var okay = true;

	if (okay == true){
        if($('#Opportunity1')){
	        var str = $('#Opportunity2').val();
	        if (str) {
	            str = str.replace(/^\s*|\s*$/g,"");
	        }
    		if ($('#Opportunity1').val() == 0 && !str && str.length < 3){
    			alert("Please select your Primary Business Opportunity.")
    			okay = false;
    		}else{
    			$('#Primary_Opportunity1').val($('#Opportunity1').val());
    			$('#Primary_Opportunity2').val($('#Opportunity2').val());
    		}
    	}
	}
	
	if(okay){
		$('#orderForm').submit();
	}else{
		// alert('Please select a subscription package.');
	}	
};

function login(){
	if ($('#cLoginURL') && $('#cLoginURL').val() != '') {
		url = $('#cLoginURL').val() + "default/auth/login";
	} else {
		url = "http://www.responsivedata.com/leadspanel/default/auth/login";
	}
	f = $('#loginForm');
	
	if( jQuery.trim($('#cLoginUserName').val()) == false || jQuery.trim($('#cLoginPassword').val()) == false){
		alert('Please enter a login name and your password.');
		return false;
	};
	
	f.action = url;
	f.submit();
	
	return false;
};


//-->