function clear_input(e,value) { if( e.value==value) e.value=""; else if( e.value.length==0 ) e.value=value; } function delete_confirm(url) { var agree=confirm("Are you sure you wish to delete?"); if (agree) window.location=url; else return false ; } function popup(url,width,height) { newwindow=window.open(url,'name','height='+height+',width='+width+',toolbar=no,menubar=no,scrollbars=yes,resizable=no'); if (window.focus) {newwindow.focus()} return false; } var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; function validate_form() { if( document.getElementById('name') ) { var item = document.getElementById('name'); var error1 = false; if( item.value.length 0) { var contentElement = document.getElementById(element_id); var contentHeight = contentElement.offsetHeight; if (windowHeight - contentHeight > 0) { contentElement.style.position = 'relative'; contentElement.style.top = ((windowHeight / 2) - (contentHeight / 2)) + 'px'; } else { contentElement.style.position = 'static'; } } } } window.onload = function() { setContent(); } window.onresize = function() { setContent(); } }