Sprawdzenie czy w querystringu istnieje parametr

var search=unescape(window.location.search);
if(search=='') {
} else {
var re = new RegExp('&b=(.?)','ig');
var tmp=re.exec(search);
var re_b='';
if(tmp!=null) {
re_b=tmp[1];
$('#right td select[name=b]').val(re_b);
}
}


 function openfoto(param) {

        url = ” + param;

        okno = window.open(url, „”, „toolbar=0,location=0,resizable=1,directories=0,status=0,menubar=0, scrollbars=0,width=50,height=50″);
       
     okno.document.write(‘<html><head><title>Foto</title>’);
        okno.document.write(‘<SCRIPT LANGUAGE=”JavaScript”>’);
        okno.document.write(‘ function resize() {\n’);
        okno.document.write(‘ var i = 0; \n’);
        okno.document.write(” if (navigator.appName == ‘Netscape’) i=40;\n”);
        okno.document.write(‘ if (document.images[0]) { \n’);
        okno.document.write(‘ window.resizeTo(document.images[0].width+10, document.images[0].height+40-i)\n’);
        okno.document.write(‘ }\n’);
        okno.document.write(‘ }\n’);
        okno.document.write(” </SCRIPT>\n”);
        okno.document.write(„</head>\n”);
        okno.document.write(‘<body bgcolor=”#FFFFFF” leftMargin=”0″ topMargin=”0″ marginheight=”0″ marginwidth=”0″><IMG src=”‘+param+’” mce_src=”‘+param+’” onLoad=”resize()”></body></html>’);

        okno.focus();
    }

 

<td><a href=”javascript:openfoto(‘images/galeria/p_001.jpg’)” class=”imgCompLink”><img src=”images/galeria/small/p_001.jpg” border=”0″ width=”150″ height=”120″></a></td>


<script language=”JavaScript”>
window.setTimeout(function() { window.location.reload(); }, 5000);
</script>


http://www.adamsuszek.pl/oferta

if(window.location.href.indexOf(‘oferta’)!=-1) {
 alert(‘ok’)
}


function scn() {

 var back = confirm(‘Czy wykonać aktualizacje ?’);
 return back;
}

function fstart() {
 var wynik = scn();
 if(wynik==false) return wynik;
 var elem = document.getElementById(„synch”);
 elem.src = „synchronize.php?id=194″;
}

window.onload = fstart;


if(document.getElementById(‘the_iframe_map’)!=undefined)
 parent.document.frames['the_iframe_map'].window.mappos(lat, lng);


<div class=”map_tip” onclick=”window.location.replace(‘/hotel_mapa.html’)”">&nbsp;</div>


<head>
<script type=”text/javascript”>

 window.onload = function()
 {
  document.getElementById(‘link’).onclick = Info;
 }
 function Info()
 {
  alert(window.event.type);
        alert(this.getAttribute(‘title’));
 }

</script>

</head>
<body>
 <a href=”#” id=”link” title=”Miasto Warszawa, Lublin, Chełm, Zamość”>zobacz miasta z title linku</a>
</body>


var PreOnload =(window.onload)? window.onload : function(){};
window.onload = function(){PreOnload(); SimpleSetup();}