function Focus(input) { if( input.value == input.title ) { input.value = ''; //input.setStyle({ color: '#222222' }); } } function Blur(input) { //input.setStyle({ border: '1px solid #9a9a9a' }); if( input.value.strip() == '' ) { input.value = input.title; //input.setStyle({ color: '#BBBBBB' }); } } function search() { var div = $('search'); var text = $('sinput'); if( text.value.strip().length < 2 || text.value == text.title ) { div.down('p').removeClassName('hidden'); return false; } div.down('form').submit(); return true; } function checkMail( input ) { var result = ( /^\w+[A-Za-z0-9\-\_\.]{1,50}\w+@\w+\.?[a-z0-9\-\_]{1,30}\.[a-z]{2,4}$/.test( input.value ) ) ? true : false; return result; } var ShowCnt = Class.create(); ShowCnt.prototype = { initialize: function( block, item_class ) { this.block = $(block); this.item_class = item_class; this.browser_width = document.documentElement.clientWidth || document.body.clientWidth || window.innerWidth || 0; this.browser_width = parseInt( this.browser_width ); this.browser_height = document.documentElement.clientHeight || document.body.clientHeight || window.innerHeight || 0; this.browser_height = parseInt( this.browser_height ); this.IE = ( navigator.userAgent.indexOf('MSIE') != -1 ) ? true : false; this.loader = '
Loading...
'; this.close_btn = ''; this.template = '