











function LokSearch(DOSEARCH) {
	var destination;
	var query = "?as_qdr=m6&num=100&safe=off";
	var q = document.getElementById('q').value;
	
	if (q != "") query = query + "&q="+q;
	switch (DOSEARCH) {
		case 'groklaw':
			if (q != "") { 
				query = "search.php?query="+q;
			} else {
				query = "";
			}
			destination = "http://www.groklaw.net/"+query;
			break;
		case 'register':
			destination = "http://www.theregister.co.uk/index.html";
			break;
		case 'freshmeat':
			if (q != "") query = "search/?q="+q;
			destination = "http://freshmeat.net/"+query;
			break;
		case 'google':
			destination = "http://www.google.com/search"+query;
			break;
		case 'images':
			destination = "http://images.google.com/images"+query;
			break;
		case 'microsoft':
			destination = "http://www.google.com/microsoft"+query;
			break;
		case 'linux':
			destination = "http://www.google.com/linux"+query;
			break;
		case 'local':
			query = "?near=Sylvan+Lake,+AB&q="+q;
			destination = "http://local.google.ca/local"+query;
			break;
		case 'google':
			destination = "http://www.google.com/"+query;
			break;
		default:
			destination = "http://www.google.com/"+query;
			break;
	}
	frameSrc(destination);
}

function frameSrc(url) {
	document.getElementById('press').src=url;
}

function searchType(type) {
	document.getElementById('searchType').innerHTML = type;
}

function fixHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  // myHeight -= 150;
  myHeight -= 60;
  myWidth -= 4;
  document.getElementById('press').style.height = myHeight;
  document.getElementById('press').style.width = myWidth;

}
