function subForm( obj_id ) { var obj = document.getElementById(obj_id); if( obj ) obj.submit(); } function newwin(url,w,h) { var window_name = 'myWin_' + Math.round( Math.random()*1000 ) ; var myWin = open(url, window_name, 'location=0,menubar=0,toolbar=0,resizable=1,scrollbars=1,width='+w+',height='+h+''); if ( myWin ) myWin.focus(); } function showLayer( obj ) { if ( obj ) { obj.style.display = (obj.style.display == 'none') ? '' : 'none'; } } function changeOption( targ,selObj ) { eval(targ + ".location='"+selObj.options[selObj.selectedIndex].value + "'"); } function switchVisibility( obj_id ) { var obj = (typeof obj_id == 'object') ? obj_id : document.getElementById(obj_id); if( obj ) { obj.style.display = ( obj.style.display == 'block' ) ? 'none' : 'block'; } } function checkMail( obj_id ) { var obj = (typeof obj_id == 'object') ? obj_id : document.getElementById( obj_id ); if( ! obj ) { return false; } var is_valid_mail = ( /^\w+[A-Za-z0-9\-\_\.]{1,50}\w+@\w+\.?[a-z0-9\-\_]{1,30}\.[a-z]{2,4}$/.test( obj.value ) ) ? true : false; return is_valid_mail; } function checkNum( obj_id ) { var obj = (typeof obj_id == 'object') ? obj_id : document.getElementById( obj_id ); if( ! obj ) { return false; } var is_valid_number = ( !isNaN( obj.value ) && !/^\s+$/.test( obj.value ) ) ? true : false; return is_valid_number; } function subscribe( unsubscribe_action ) { var the_form = $('subscribe_form'); var elements = Form.getElements(the_form); for(var i=0; i