
var q = window.location.search;
if(q!="") {
document.getElementById("ifrm").src =  "http://localhost/songListSearch.php"+q;
document.getElementById("ifrm").style.width  = getQuerystring("frmWidth2","800") + "px";


document.getElementById("ifrm").style.height = setFrmHeight()+"px";

document.getElementById("ifrm").style.cellpadding = 0+"px";
document.getElementById("ifrm").style.cellspacing  = 0+"px";
document.getElementById("ifrm").style.scrolling = "no";
document.getElementById("ifrm").style.marginHeight = 0+"px";
document.getElementById("ifrm").style.marginWidth = 0+"px";

document.getElementById("ifrm").style.border = 0;
}
function setFrmHeight() {
 if(getQuerystring("searchBy","")=="songTitle"){
	 return 800;
 }else{
	return 1200; 
 }
}

function getQuerystring(key, default_)
{
  if (default_==null) default_="";
  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
  var qs = regex.exec(window.location.href);
  if(qs == null)
    return default_;
  else
    return qs[1];
}

