
/************************************************** 
 * 
 * (C) Alexander Trofimov (kolimarfey@gmail.com)
 *
 * You can NOT redistribute it and/or modify without permission of Alexander Trofimov 
 *
 **************************************************/

function GSK (sId, sSite)
{
	this._sIdContainer = sId;
	this._oSearchControl = null;
	this._oWebSearch = null;
	this._oImagesSearch = null;
	this._sSite = sSite;
}

GSK.prototype.init = function ()
{				
	google.load("search", "1");
	var $this = this;
	var h = function () 
	{

		$this._oSearchControl = new google.search.SearchControl();		


		$this._oWebSearch = new google.search.WebSearch();		
		$this._oWebSearch.setSiteRestriction ($this._sSite);
		$this._oSearchControl.addSearcher($this._oWebSearch);

		$this._oSearchControl.draw($this.id($this._sIdContainer));
	}					
	google.setOnLoadCallback(h);
}


GSK.prototype.id = function (id)
{
	return document.getElementById(id);
}
