function CheckMultiple98(frm, name) {
	for (var i=0; i < frm.length; i++) {
		fldObj = frm.elements[i];
		fldId = fldObj.id;
		if (fldId) {
			var fieldnamecheck=fldObj.id.indexOf(name);
			if (fieldnamecheck != -1) {
				if (fldObj.checked) {
					return true;
				}
			}
		}
	}
	return false;
}
function CheckForm98(f) {
	var email_re = /[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i;
	if (!email_re.test(f.email.value)) {
		alert("Please enter your email address.");
		f.email.focus();
		return false;
	}
	return true;
}




var $J = jQuery.noConflict();

$J(document).ready(function($){ 
	$('#dcflash').flashembed({
		src: '/themes/distinct/javascript/DC_Flash.swf',
		wmode: 'opaque',
		onFail: function() {
			$('#dcflash').html('You need Flash Player');
		}
	});
	
	$("a[rel]").overlay({
		finish: {top: 'center'}, 
	    expose: { 
            color: '#202020', 
            opacity: 0.7, 
            closeSpeed: 1000 
        } 
	});	
	$('#CustomLogin_LoginForm_Email').watermark('Client Code');
	$('#CustomLogin_LoginForm_Password').watermark('Password');
	
	//$('#CustomLogin_LoginForm').bind('click keydown', function() { 
	//	$('#login, #login h1, #login form').expose({ 
	//		color: '#202020',
	//		loadSpeed: 'fast',
	//		api: true
	//	}).load(); 
	//}); 
	
	$('#subscribebutton').hover(function () {
		$(this).attr('src','/themes/distinct/images/buttons/addme_over.gif');
	}, function() {
		$(this).attr('src','/themes/distinct/images/buttons/addme.gif');
	});
	$('#corporateprofilebutton').hover(function () {
		$(this).children('img').attr('src','/themes/distinct/images/buttons/sendtomenow_over.gif');
	}, function() {
		$(this).children('img').attr('src','/themes/distinct/images/buttons/sendtomenow.gif');
	});

	$('#Form_ProfileForm input.text').each(function(index) {
		$(this).watermark($(this).parent().parent().children('label').html());
	});
}); 