function getKey(e){if(window.event)
return window.event.keyCode;else if(e)
return e.which;else
return null;}
function getKey_backspace(e,obj){key=getKey(e);if(key==8){var cur=obj.selectionStart-1;obj.selectionStart=cur;obj.selectionEnd=obj.value.length;}
return true;}
function chk_regExp_test(obj,target)
{var re=new RegExp(target);var m=re.exec(obj.value);return m;}
function chk_regExp(obj,target,sample,exectLength,wypelnianieDoKonca){if(exectLength)
obj.maxLength=sample.length;var m=chk_regExp_test(obj,target);if(m==null){obj.style.backgroundColor="yellow";}
else{obj.style.backgroundColor=null;}
if(m==null&&(wypelnianieDoKonca)){var cur=obj.selectionStart;var toAdd=sample.substring(cur,sample.length);obj.value+=toAdd;obj.selectionStart=cur;}}
function check_form(f){if(f.elements['imie_nazwisko'].value==""||f.elements['email'].value==""||f.elements['tresc'].value==""){alert('Wymagane pola nie zostały wypełnione. Wypełnij pola aby wysłać zapytanie');return false;}
return true;}
var popUpWin=0;function popUpWindow(URLStr){width=320;height=240;if(popUpWin){if(!popUpWin.closed)popUpWin.close();}
var left=10;var top=10;popUpWin=open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');}
var neww;function script_popUp(url){neww=window.open(url,'name','height=480,width=640,scrollbars=yes');if(window.focus){neww.focus();}}
function base_adev_action(formName){alert(formName);script_popUp('base_adev.php');document[formName].imie.value="dupa jasio";document[formName].target="name";document[formName].method="post";document[formName].action="base_adev.php";document[formName].submit();}
function pngfix()
{var arVersion=navigator.appVersion.split("MSIE")
var version=parseFloat(arVersion[1])
if((version>=5.5)&&(document.body.filters))
{for(var i=0;i<document.images.length;i++)
{var img=document.images[i]
var imgName=img.src.toUpperCase()
if(imgName.substring(imgName.length-3,imgName.length)=="PNG")
{var imgID=(img.id)?"id='"+img.id+"' ":""
var imgClass=(img.className)?"class='"+img.className+"' ":""
var imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' "
var imgStyle="display:inline-block;"
if(img.align=="left")imgStyle="float:left;"+imgStyle
if(img.align=="right")imgStyle="float:right;"+imgStyle
if(img.parentElement.href)imgStyle="cursor:hand;"+imgStyle
var strNewHTML="<span "+imgID+imgClass+imgTitle+" style=\""+"width:"+img.width+"px; height:"+img.height+"px;"+imgStyle+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src=\'"+img.src+"\', sizingMethod='image');\"></span>"
img.outerHTML=strNewHTML
i=i-1}}}}
