var preFillAutoSuggestData = true; function setAutoSuggestPrefillData(input){ //preFillAutoSuggestData = input; if(preFillAutoSuggestData==true){ $('.tagSuggest').autoSuggest('/index.php', { queryParam: 'typedString', extraParams: '&where=ss_ajax&q=suggest&s_what=tag', minChars: 1, matchCase: false, startText: '', emptyText: '', preFill: input }); preFillAutoSuggestData=false; } } function windowSizeX(){ var width = 0; if( typeof( window.innerWidth ) == 'number' ) var width = window.innerWidth; else if( document.documentElement && document.documentElement.clientWidth ) var width = document.documentElement.clientWidth; else if( document.body && document.body.clientWidth ) var width = document.body.clientWidth; return width; } function windowSizeY(){ var height = 0; if( typeof( window.innerHeight ) == 'number' ) var height = window.innerHeight; else if( document.documentElement && document.documentElement.clientHeight ) var height = document.documentElement.clientHeight; else if( document.body && document.body.clientHeight ) var height = document.body.clientHeight; return height; } var ablak = new Object(); ablak.x=windowSizeX(); ablak.y=windowSizeY(); function show( id, method, velocity ){ if(method==undefined) method='slide'; if(velocity==undefined) velocity='slow'; if(method=='slide') $("#" + id).slideDown(velocity); else if(method=='fade') $("#" + id).fadeIn(velocity); else if(method=='show') $("#" + id).show(velocity); else if(method=='toggle') $("#" + id).toggle(velocity); } function hide( id, method, velocity ){ if(method==undefined) method='slide'; if(velocity==undefined) velocity='slow'; if(method=='slide') $("#" + id).slideUp(velocity); else if(method=='fade') $("#" + id).fadeOut(velocity); else if(method=='show') $("#" + id).hide(velocity); else if(method=='toggle') $("#" + id).toggle(velocity); } function hideShowObj(id){ if(document.getElementById( id ) == null) return; obj = document.getElementById( id ); if(obj.style.display == 'none'){ show( id ); }else{ hide( id ); } } function htmlEncode( string ) { if(string.length>0){ string = escape(string); string = string.replace(/\//g,"%2F"); string = string.replace(/\?/g,"%3F"); string = string.replace(/=/g,"%3D"); string = string.replace(/&/g,"%26"); string = string.replace(/@/g,"%40"); //alert(string); } return string; } function replaceChars( string ) { if(string.length>0){ string = string.replace(/ü/g,"ü"); string = string.replace(/Ü/g,"ü"); string = string.replace(/á/g,"á"); string = string.replace(/Á/g,"á"); string = string.replace(/é/g,"é"); string = string.replace(/É/g,"é"); string = string.replace(/í/g,"í"); string = string.replace(/Í/g,"í"); string = string.replace(/õ/g,"õ"); string = string.replace(/Õ/g,"Õ"); string = string.replace(/ó/g,"ó"); string = string.replace(/Ó/g,"ó"); string = string.replace(/ú/g,"ú"); string = string.replace(/Ú/g,"ú"); string = string.replace(/û/g,"ű"); string = string.replace(/Û/g,"ű"); } return string; } function validateEmail(email) { var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if(reg.test(email)== false){ return false; }else{ return true; } } function checkPasswords( obj1, obj2 ){ if(obj1 != null && obj2 != null){ if(obj1.value != obj1.defaultValue && obj2.value != obj2.defaultValue){ if(obj1.value.length > 0 && obj2.value.length > 0){ if(obj1.value == obj2.value){ return true; } } } } return false; } function checkRegForm( form ){ for(var i=0; i