function checkform(){
  form = window.document.gs;
  if(form.q1.value=='') return false;
  form.q.value = encodeURIComponent(form.q1.value);
}

function checkform01(){
  form = window.document.gs;
  if(form.q.value=='') return false;
  form.q.value = form.q.value;
}

function iFrameHeight() {
	var h = 0;
	if ( !document.all ) {
		h = document.getElementById('searchpage').contentDocument.height;
		document.getElementById('searchpage').style.height = h + 10 + 'px';
	} else if( document.all ) {
		h = document.frames('searchpage').document.body.scrollHeight;
		document.all.searchpage.style.height = h + 10 + 'px';
	}
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
}

function loadcontent(){
  q = getQueryVariable('q');
  if(q != "" && q != undefined){
    q = decodeURIComponent(q);
    form = window.document.gs;
    form.q.value = encodeURIComponent(q);
    form.submit();
  }
}

