function openPopUp(url, windowName, w, h, scrollbar)

{

           var winl = (screen.width - w) / 2;

           var wint = (screen.height - h) / 2;

           winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scrollbar ;

		   win = window.open(url, windowName, winprops);

           if (parseInt(navigator.appVersion) >= 4) {

              	win.window.focus();

           }

}



function domainLookup(value) {

	jQuery.ajax({
        type: 'POST',
        url: '/php/check_domain.php',
        cache: false,
        data: ({subdomain:value}),
        success: function(data) {
            if (parseInt(data) > 0) {
                // display warning message
                jQuery('#subdomain_warning').empty();
                jQuery('#subdomain_warning').append('Domain name <strong>'+value+'.vyoopoint.com</strong> is taken, please choose another.');
                jQuery('#websiteurl').val('');
            }
        }
    });
}



function setAccSrcValidation(id, status)

{

    if ('Other'==status) {

        jQuery('#'+id).toggleClass('required');

    } else {

        jQuery('#'+id).removeClass('required');

        jQuery('#'+id).removeClass('validation-failed');

        jQuery('#advice-required-account_source_other').hide();

    }

}