var tsurl = "http://cdn-highschools.newsweek.com/highschools2009a/";
var inturl = "http://cdn-highschools.newsweek.com/highschools2009a/interactive/";
/*var tsurl = "http://dev.newsweek.com";
var inturl = "http://dev.newsweek.com/interactive/";*/
function resizeIFrame(hei) {
 document.getElementById(hscont_id).style.height = hei+"px";
}
function getQSPath() {
 qs=location.search.substring(1,location.search.length);
 if (qs.length == 0) return tsurl;
 qs = qs.replace(/\+/g, ' ');
 var args = qs.split('&');
 var pth = '';
 var srch = '';
 for (var i=0;i<args.length;i++) {
  var pair = args[i].split('=');
  if(decodeURIComponent(pair[0])=='q'){
   if(pair[1].toUpperCase()=="INTERACTIVE") return inturl;
   else pth = decodeURIComponent(pair[1]);
  }
  if(decodeURIComponent(pair[0])=='s')
   srch = '&s='+decodeURIComponent(pair[1]);
 }
 return tsurl+'?q='+pth+srch;
}
document.getElementById(hscont_id).src = getQSPath();
