﻿function frameWidth(tmp)
{
    tmp.height = 850;
}

function change_lang(val1,val2){
	//alert(window.location.href);
	url = window.location.href.replace(val1,val2);
	window.location=url;
}

function searchLink()
{    
    var pattern = this.document.getElementById('textBox1').value;
    //alert(this.document.getElementById('textBox1').value);
    if (pattern.length >0)
    {
        self.parent.location = "http://search.gov.hk/search.html?ui_lang=zh-hk&ui_charset=utf-8&tpl_id=stdsearch&gp0=gip_labour_home&gp1=gip_labour_home&web=this&query=" + pattern;
    }
    else alert("請輸入關鍵字");
   
}

function search(e)
{
   var keycode;
   if (self.window.event) keycode = window.event.keyCode;
   else if (e) keycode = e.which;
   //alert(keycode);
   if (keycode == 13)
   {
      searchLink(); 
   }
}