//DO mintAJAX



function chkMail(ind)

{

	var mail = document.getElementById("kom_mail" + ind).value;

	

	return sprawdzEmail(mail, "kom_mail", ind);

}





function SendRequest(ind) {

		



    document.getElementById("kom_input_area" + ind).style.color = "black";

		document.getElementById("kom_nick" + ind).style.color = "black";

		document.getElementById("kom_mail" + ind).style.color = "black";

		

		

		

		

		

		var req = mint.Request();

               

    req.OnSuccess = function() {     

		//document.getElementById("kom_input_area" + ind).style.color = "black"

		

		//document.getElementById("kom_nick" + ind).readOnly = true;

		//document.getElementById("kom_mail" + ind).readOnly = true;

			

    }

               

    req.SendForm("com_add" + ind);

}













//zmiana ofert

function changecontent(){

if (index>=fcontent.length)

index=0

if (DOM2){

document.getElementById("fscroller").style.color=startcolor

document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag

linksobj=document.getElementById("fscroller").getElementsByTagName("A")

if (fadelinks)

linkcolorchange(linksobj)

colorfade()

}

else if (ie4)

document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag

else if (ns4){

document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag)

document.fscrollerns.document.fscrollerns_sub.document.close()

}



index++

setTimeout("changecontent()",delay+faderdelay)

}



// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////

// Modified by Dynamicdrive.com



frame=20;



function linkcolorchange(obj){

if (obj.length>0){

for (i=0;i<obj.length;i++)

obj[i].style.color="rgb("+hex+","+hex+","+hex+")"

}

}



function colorfade() {	         	

// 20 frames fading process

if(frame>0) {	

hex=(fadescheme==0)? hex-12 : hex+12 // increase or decrease color value depd on fadescheme

document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.

if (fadelinks)

linkcolorchange(linksobj)

frame--;

setTimeout("colorfade()",80);	

}



else{

document.getElementById("fscroller").style.color=endcolor;

frame=20;

hex=(fadescheme==0)? 255 : 0

}   

}



//koniec zmian ofert





//uzyteczne funkcje js.

var bookmarkurl="http://www.warszawskie.net";

var bookmarktitle=document.title 



function addbookmark(){ 

if (document.all) 

	window.external.AddFavorite(bookmarkurl,bookmarktitle) 

else

	alert("Po zamknieciu tego okna wci¶nij klawisze Crtl + D, aby dodać stronę do ulubionych");

} 





function tylko_liczby()

{

         //ta funkvja ma jakis blad...

		 if (event.keyCode<48 || event.keyCode>57)

         event.returnValue = false;

}



function noweOkno(url,ust)

{

				if(ust=='1')

					ustawienia="toolbar=no,location=no,directories=no,status=no,menubar=no,fullscreen=no,resizable=yes,scrollbars=no,width=600,height=480";

				else

					ustawienia = null;

				window.open(url,'zdjęcie',ustawienia);

}





function kasuj_confirm(url)

{

            if (confirm('Czy napewno chcesz wykonać kasowanie?'))

            {

                location.href=url;

            }

}

function zamow_confirm(url)

{

            if (confirm('Czy napewno chcesz wykonać zamówienie?'))

            {

                location.href=url;

            }

}

function bos_confirm(text,url)

{

            if (confirm(text))

            {

                location.href=url;

            }

}









function clearArea(ind)

{

	if(document.getElementById("kom_input_area" + ind).style.color=="black")

		{

		document.getElementById("kom_input_area" + ind).value = "";

		document.getElementById("kom_input_area" + ind).style.color = "gray";

		}

}



function sprawdzEmail(AdresEmail, doc, ind)

{

	var TestEmail =  /^([A-Za-z0-9\-]*\w)+@+([A-Za-z0-9\-]*\w)+(\.[A-Za-z]*\w)+$/;

	var Wynik = AdresEmail.match(TestEmail);



	if (Wynik == null)

	{

		if(document.getElementById("kom_btn" + ind).display != "none")

			animatedcollapse.hide("kom_btn" + ind);

	}

	else

	{

			

				animatedcollapse.show("kom_btn" + ind);

		

		

	}

}



//-->


