function dvLoad(obname,url){        

$.ajax({
  url: url,
  cache: false,
  success: function(html){
    $("#"+obname).html(html);
  }
});

     
}			

function upload(obj){
  $('#loading').show();
obj.submit()  
 
}

function mail(a,b,desc){
  if(desc.length==0)desc=a+'@'+b
  document.write('<a href="mailto:'+a+'@'+b+'" >'+desc+'</a>')
}

function sendTrans(id){
if(!validate(document.getElementById(id).elements)) document.getElementById(id).submit();
}
function validate(f){
var v,i,e
for(i=0;e=f[i++];)
  if(v=window[e.getAttribute('valid')]){   
   if(!v(e.value))
    {    
    alert(e.getAttribute('alert'));e.focus();return 1}
    }
}

function niepuste(x){return x>''}
function ismail(e){return (/^[\w\.-]{2,}@[\w\.-]+\.[a-z]{2,5}$/i.test(e))||(e=='')}
function noempymail(e){return (/^[\w\.-]{2,}@[\w\.-]+\.[a-z]{2,5}$/i.test(e))>''}
function isnumopt(x){return x==~~x}
function isnum(x){return x==parseInt(x)}
function iscnum(x){return (/[\d]/.test(x))>''}
function istel(e){return (/\+[0-9]{11,18}/.test(e))>''}

function submitForm(){
  if(!validate(document.getElementById('formk').elements)) document.getElementById('formk').submit();
}

function a_blur() {
	
	var arr = document.getElementsByTagName( 'a' );
	for( i=0; i<arr.length; i++ ) {
	arr[i].setAttribute('onFocus', 'blur()');
	
	}
}

function search(msg){
if(document.getElementById('searchText').value.length<4){
alert(msg);
return false;
}else{
document.getElementById('forms').submit();
}

}