Should be:
Code:
window.onload = function () {
if(document.forms["searchbox_006388034472510427843:pil-s7xg5oy"].q.value.toLowerCase() == "google"){
window.open("http://www.google.com", "site")}
}
And, you don't need the id for the iframe tag, name is sufficient:
HTML Code:
<iframe src="http://www.yahoo.com" width="95%" height="95%" align="top" name="site"></iframe>
Your form should look something like so (names, not id's should be used):
HTML Code:
<form action="#" name="searchbox_006388034472510427843:pil-s7xg5oy">
<input type="text" name="q" value="Google">
</form>
If all that checks out, the only thing that I can think of is that:
Code:
document.forms["searchbox_006388034472510427843:pil-s7xg5oy"].q.value.toLowerCase() == "google"
tests as false for some reason but, that has nothing to do with the code you have shown.
Bookmarks