// JavaScript Document
var host='http://www.typinski.pl/';
function addhost(user)
{
if((user.indexOf('@')=='-1')&&(user!=''))document.forms.log_in.login_username.value+='@typinski.pl';
}
function clearer(val,w)
{
if(w==0) { if(val=='login')document.forms.log_in.login_username.value=''; }
if(w==1) { if(val=='password')document.forms.log_in.secretkey.value=''; }
if(w==2) { if(val=='Twój email...')document.forms.qfq.fn_email.value=''; }
if(w==3) { if(val=='zapytanie...')document.forms.qfq.fn_uwagi.value=''; }
}

function validate(formek)
{
if( (formek.fn_email.value=='')||(formek.fn_email.value.search("@")==-1)||(formek.fn_uwagi.value==''))
	{
	alert('Upewnij się iż formularz jest poprawnie wypełniony');
	return false;
	}
else
	{
	return true;
	}
}

function email(u)
{
if(u=='')u='biuro';
var h='typinski';
var d='pl';
var ah='a href';
var mt='mailto';
document.write('<'+ah+'="'+mt+':'+u+'@'+h+'.'+d+'" style="color:#000033; text-decoration:none;">'+u+'@'+h+'.'+d+'</a>');
}

function mkln(l,dsc,c)
{
var ahr='<a href';
var ac='</a>';
document.write(ahr+'="http://'+l+'" class="'+c+'" target="_blank">'+dsc+ac);
}


function flash()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="512" height="217">\
<param name="movie" value="'+host+'swfs/topright.swf" />\
<param name="quality" value="high" />\
<embed src="'+host+'swfs/topright.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="512" height="217"></embed>\
</object>');

}


function footer()
{

document.write('<div class="div780">\
 <div class="foot_side"><img src="'+host+'imgs/foot_bg.png" alt="pozycjonowanie warszawa" class="ifu"/></div>\
 <div class="foot_3"><img src="'+host+'imgs/foot_center_left.png" alt="pozycjonowanie stron warszawa" /></div>\
 <div class="foot_center"><p class="p_foot">&copy; <a href="http://www.typinski.pl/" title="tworzenie i pozycjonowanie stron" class="foot_a">typinski.pl</a></p></div>\
 <div class="foot_3"><img src="'+host+'imgs/foot_center_left.png" alt="pozycjonowanie stron warszawa" /></div>\
 <div class="foot_side"><img src="'+host+'imgs/foot_bg.png" alt="pozycjonowanie warszawa" class="ifu"/></div>\
</div><div class="clearer"></div>');
}

function header()
{
document.write('\
   <!-- header -->\
     <div class="div780">\
	  <div class="left268bg">\
	   <div class="div1"><img src="'+host+'imgs/empty.gif" style="width:1px; height:91px;" alt="tworzenie stron"/></div>\
	   <div style="float:left;left:20px; top:20px; position:relative;">\
	   <a href="?" onclick="sitemap(); return false;" title="Pozycjonowanie stron" onfocus="this.blur();">\
	   <img src="'+host+'imgs/mapa.gif" alt="mapa strony" /></a>\
	   <a href="?" title="Laboratorium PHP" onfocus="this.blur();">\
	   <img src="'+host+'imgs/labs.gif" alt="Laboratorium PHP" style="margin-left:15px;"/></a>\
	   <a href="?" onclick="brief(); return false;" title="Brief" onfocus="this.blur();">\
	   <img src="'+host+'imgs/brief.gif" alt="Brief" style="margin-left:15px;"/></a>\
	   </div><div class="clearer"></div>\
	   <div class="left268">\
	    <div class="left174">\
	     <div class="head_leftl"><img src="'+host+'imgs/arrow_left.png" alt="tworzenie stron" /></div>\
 		 <div class="underheadinglog"><p class="right_title">poczta</p></div><div class="clearer"></div>\
		 <div class="left174bg">\
		   <div class="left4"><img src="'+host+'imgs/empty.gif" style="width:4px; height:94px; " alt="stron warszawa"/></div>\
		   <div class="logdiv">\
		   <form name="log_in" action="http://malpa.info/src/redirect.php" method="POST" target="_blank" style="margin-top:21px; ">\
		   <input type="hidden" name="js_autodetect_results" value="0" />\
		   <input type="hidden" name="just_logged_in" value="1" />\
		   <input type="text" name="login_username" class="logintext" value="login" onFocus="clearer(this.value,0)" onblur="addhost(this.value)"/><br/>\
		   <input type="password" name="secretkey" class="logintext" value="password" onFocus="clearer(this.value,1)"/>\
		   <input type="image" name="sub_ok" src="'+host+'imgs/button_ok.gif" style="margin-left:1px; margin-bottom:-2px;"/>\
		   </form>\
		   </div>\
		 </div>\
		</div>\
		<div class="left94"><img src="'+host+'imgs/lady_bottom.jpg" alt="reklama stron" /></div>\
	   </div>\
	  </div>\
	  <div class="flasher"><script type="text/javascript">flash();</script></div>\
	  <div class="clearer"></div><img src="'+host+'imgs/divider.png" alt="tworzenie" /></div>\
   <!-- eoheader-->\
');

}

function qform()
{
document.write('\
<form name="qfq" action="'+host+'/kontakt.htm" method="post" onsubmit="return validate(this);">\
<input type="text" name="fn_email" value="Twój email..." class="inputtext" onfocus="clearer(this.value,2)"/><br/>\
<textarea name="fn_uwagi" class="inputtext" style="height:50px;" onfocus="clearer(this.value,3)">zapytanie...</textarea><br/>\
<input type="image" src="'+host+'imgs/button_ok.gif" style="margin-left:70px;" /></form>\
');

}


function flash_promo(path)
{
document.write('\
<div class="promodv">\
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="150" height="110">\
<param name="movie" value="'+host+'swfs/'+path+'.swf">\
<param name="quality" value="high">\
<embed src="'+host+'swfs/'+path+'.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="110"></embed>\
</object></div>\
');
}

/* sitemap */
sitmp=1;
function sitemap()
{
if(sitmp==1){document.getElementById("sitemap").style.display='block';sitmp=0;}
else{document.getElementById("sitemap").style.display='none';sitmp=1;}
}

/* brief */
brf=1;
function brief()
{
if(brf==1){document.getElementById("brief").style.display='block';brf=0;}
else{document.getElementById("brief").style.display='none';brf=1;}
}

function ascii()
{
for(a=1;a<403;a++)
	{
	document.write('<div class="ascii">&amp;#'+a+'; -> <b>&#'+a+';</b></div>');
	if(Math.round(a/3)-(a/3)==0)document.writeln('<div class="clearer"></div>');
	}
}


function kontakt()
{
document.write('\
	<b class="starter">Wypełnij poniższy formularz</b><br/><br/>\
	<form name="kontakter" action="?reklama=kontakt" method="POST" onsubmit="return validate(this);" style="margin:0px;">\
	Imię i nazwisko:<br/>\
	<input type="text" name="fn_imie" class="inputtext" maxlength="40"/><br/>\
	Nazwa firmy:<br/>\
	<input type="text" name="fn_firma" class="inputtext" maxlength="40"/><br/>\
	Telefon:<br/>\
	<input type="text" name="fn_telefon" class="inputtext" maxlength="20"/><br/>\
	Adres email:<br/>\
	<input type="text" name="fn_email" class="inputtext" maxlength="40"/><br/>\
 	Wpisz swoje pytania i uwagi:<br />\
	<textarea cols="30" rows="5" name="fn_uwagi" class="inputtext"></textarea><br/><br/>\
	<input type="image" src="'+host+'imgs/button_ok.gif" style="margin-left:70px;" /><br/>\
	</form>\
');

}