function $() {var elements = new Array();for (var i = 0; i < arguments.length; i++) {var element = arguments[i];if (typeof element == 'string')
element = document.getElementById(element);if (arguments.length == 1)
return element;elements.push(element);}
};Function.prototype.createDelegate = function(obj, args, appendArgs) {var method = this;return function() {var callArgs = new Array();var callArgs = args || arguments;if (appendArgs === true) {callArgs = Array.prototype.slice.call(arguments, 0);callArgs = callArgs.concat(args);}
else if (typeof appendArgs == "number") {callArgs = Array.prototype.slice.call(arguments, 0);var applyArgs = [appendArgs, 0].concat(args);Array.prototype.splice.apply(callArgs, applyArgs);}
return method.apply(obj || window, callArgs);};};Function.prototype.CallBack = function(object) {var method = this;return function(event) {method.call(object, event || window.event);}
};var Gys = {Version:"1.0.0",Browser: {IE:     !!(window.attachEvent && !window.opera),Opera:  !!window.opera,WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,Gecko:  navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
},StageSize : function()
{var winWidth=0;var winHeight=0;if(window.innerWidth)
winWidth = window.innerWidth;else if((document.body) && (document.body.clientWidth))
winWidth = document.body.clientWidth;if(window.innerHeight)
winHeight = window.innerHeight;else if((document.body) && (document.body.clientHeight))
winHeight = document.body.clientHeight;if(document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth)
{winHeight = document.documentElement.clientHeight;winWidth = document.documentElement.clientWidth;}
return { width : winWidth, height : winHeight };}
};Gys.$Bind = function(destination, source) {for (var property in source)
destination[property] = source[property];return destination;};Gys.Core = Gys.$Bind(Object, {isEmpty: function(v, allowBlank) {return v === null || v === undefined || (!allowBlank ? v === '' : false);},isFunction: function(object) {return typeof object == "function";},isString: function(object) {return typeof object == "string";},isNumber: function(object) {return typeof object == "number";}
});function window_prototype_get_event() {return SearchEvent();};function SearchEvent() {if (document.all)
return window.event;func = SearchEvent.caller;while (func != null) {var arg0 = func.arguments[0];if (arg0) {if (arg0.constructor == Event || arg0.constructor == MouseEvent || (typeof (arg0) == "object" && arg0.preventDefault && arg0.stopPropagation))
return arg0;}
func = func.caller;}
return null;};if (Gys.Browser.Gecko) {HTMLElement.prototype.__defineGetter__("innerText",function() {return this.textContent.replace(/(^\s*)|(\s*$)/g, "");}
);HTMLElement.prototype.__defineSetter__("innerText",function(sText) {this.textContent = sText;}
);window.constructor.prototype.__defineGetter__("event", window_prototype_get_event);};Gys.MainButton = function(data, o) {this._downBut;this.Items = data;this.Render = o;this._create();};Gys.MainButton.prototype = {_create: function() {var li;var i = 0;for (var o in this.Items) {li = document.createElement("li");li.id = this.Render.id + "_li" + i;li.innerText = Items[o].name;li.onmousemove = this._onButMove.createDelegate(this, [li]);li.onmouseout = this._onButOut.createDelegate(this, [li]);li.onclick = this._onButClick.createDelegate(this, [li, Items[o], i]);this.Render.appendChild(li);i++;}
},_onButMove: function(but) {if (this._downBut == but) return;if (but != this._downBut) {but.style.backgroundImage = "url(http://image.iqsou.com/images/0_minabut.png)";}
},_onButOut: function(but) {if (but != this._downBut) {but.style.backgroundImage = "";}
},_onButClick: function(but, data, i) {if (this._downBut == but) return;if (!Gys.Core.isEmpty(this._downBut)) {this._downBut.style.backgroundImage = "";this._downBut.style.cursor = "hand";}
but.style.backgroundImage = "url(http://image.iqsou.com/images/0_minabut.png)";but.style.cursor = "default";this._downBut = but;data.type = i
this.onButClick(data);},setButClick: function(i) {var n = 0;for (var o in this.Items) {if (n == i) {this._onButClick($(this.Render.id + "_li" + i), Items[o], i);break;}
n++;}
},onButClick: function(e) {}
};Gys.SearchButton = function(o) {this.Render = o;this.Items;this.left;this.right;this.currentButton = Gys.Data.WindowType.right;this.hide = -1;};Gys.SearchButton.prototype = {create: function(data) {this._clear();this.Items = data;var img;var i;for (i = 0; i < this.Items.length; i++) {img = new Image();if (this.Items[i].type == Gys.Data.ButtonType.Serach) {img.src = "http://image.iqsou.com/" + this.Items[i].down;img.alt = this.Items[i].title;img.style.marginTop = "2px";img.style.cursor = "hand";img.onclick = this._onMouseDown.createDelegate(this, [this.Items[i]]);}
else if (this.Items[i].type == Gys.Data.ButtonType.Line) {img.src = "http://image.iqsou.com/images/0_line.gif";img.style.margin = "3px 10px 0 10px";}
else if (this.Items[i].type == Gys.Data.ButtonType.Web) {img.src = "http://image.iqsou.com/" + this.Items[i].down;img.alt = this.Items[i].title;img.style.marginTop = "2px";img.style.cursor = "hand";img.onclick = this.onWebClick.createDelegate(this, [this.Items[i].src]);}
this.Items[i].img = img;this.Render.appendChild(img);}
},_clear: function() {if (!this.Items) return;for (var i = 0; i < this.Items.length; i++) {this.Render.removeChild(this.Items[i].img);}
},_onMouseDown: function(o) {var tmp;if (o.state == 0) {o.img.src = "http://image.iqsou.com/" + o.up;o.state = 1;if (this.currentButton == Gys.Data.WindowType.left) {if (this.right)
if (this.right != o)
this.renew(this.right);this.right = o;this.currentButton = Gys.Data.WindowType.right;}
else {if (this.left)
if (this.left != o)
this.renew(this.left);this.left = o;this.currentButton = Gys.Data.WindowType.left;}
tmp = this.currentButton;this.onDown(o, tmp);}
else if (o.state == 1) {this.renew(o);if (this.left == o) {tmp = Gys.Data.WindowType.left;this.currentButton = Gys.Data.WindowType.right;}
else {tmp = Gys.Data.WindowType.right;this.currentButton = Gys.Data.WindowType.left;}
this.onUp(o, tmp);}
},setMouseDown: function(n) {this._onMouseDown(this.Items[n]);},renew: function(o) {o.img.src = "http://image.iqsou.com/" + o.down;o.state = 0;},onDown: function(o) {},onUp: function(o) {},reset: function(o) {o.img.src = "http://image.iqsou.com/" + o.up;o.state = 1;},onWebClick: function(src) {window.open("http://" + src);}
};Gys.SearchInput = function(t, b) {this.text = t;this.button = b;b.onclick = this._onClick.createDelegate(this);document.onkeydown = this._defaultKey.createDelegate(this);};Gys.SearchInput.prototype = {_onClick: function() {this.onSearchInputClick(this.text.value);},setKey: function(k) {this.text.value = k;},_defaultKey: function() {if (event.keyCode == 13)
this.onSearchInputClick(this.text.value);},onSearchInputClick: function(k) {}
};Gys.Timer = function()
{this.timer;};Gys.Timer.prototype =
{begin: function(ms) {this.timer = setInterval(this.onTick, ms);},stop: function() {window.clearInterval(this.timer);},onTick: function() {}
};Gys.MessageBox = function(w, h) {this.timer;this.handlerPanel = document.createElement("div");this.maskPanel = document.createElement("div");this._create();this._hodySize;this._beginInfo;this._endInfo = { "x": 0, "y": 0, "w": w, "h": h };this._currentInfo;this._show = false;};Gys.MessageBox.prototype = {_create: function() {this.timer = new Gys.Timer();this.timer.onTick = this._onMove.createDelegate(this);this.handlerPanel.style.backgroundColor = "#FFF";this.handlerPanel.style.border = "solid 3px #84cbe8";this.handlerPanel.style.marginTop = "0px";this.handlerPanel.style.marginLeft = "0px";this.handlerPanel.style.position = "absolute";this.handlerPanel.style.zIndex = 900;},_onMove: function() {if (this._show) {this._currentInfo.x += (this._endInfo.x - this._currentInfo.x) * .38;this._currentInfo.y += (this._endInfo.y - this._currentInfo.y) * .38;this._currentInfo.w += (this._endInfo.w - this._currentInfo.w) * .5;this._currentInfo.h += (this._endInfo.h - this._currentInfo.h) * .5;if ((this._currentInfo.x >= this._endInfo.x - 1 && this._currentInfo.x <= this._endInfo.x + 1) || (this._currentInfo.y >= this._endInfo.y - 1 && this._currentInfo.y <= this._endInfo.y + 1)) {this._setMesageBox(this._endInfo.x, this._endInfo.y, this._endInfo.w, this._endInfo.h);this.timer.stop();this.handlerPanel.style.opacity = "1";this.handlerPanel.style.filter = "Alpha(opacity=100);";this.onRender(this.handlerPanel);}
}
else {this._currentInfo.x += (this._beginInfo.x - this._currentInfo.x) * .28;this._currentInfo.y += (this._beginInfo.y - this._currentInfo.y) * .28;this._currentInfo.w += (this._beginInfo.w - this._currentInfo.w) * .5;this._currentInfo.h += (this._beginInfo.h - this._currentInfo.h) * .5;this._currentAlpha = Math.abs((this._currentInfo.x - this._beginInfo.x) / (this._beginInfo.x - this._endInfo.x) * 100);this.handlerPanel.style.opacity = this._currentAlpha / 100;this.handlerPanel.style.filter = "Alpha(opacity=" + this._currentAlpha + ");";if ((this._currentInfo.x >= this._beginInfo.x - 1 && this._currentInfo.x <= this._beginInfo.x + 1) || (this._currentInfo.y >= this._beginInfo.y - 1 && this._currentInfo.y <= this._beginInfo.y + 1)) {document.body.removeChild(this.handlerPanel);this.timer.stop();}
}
this._setMesageBox(this._currentInfo.x, this._currentInfo.y, this._currentInfo.w, this._currentInfo.h);},_setMesageBox: function(x, y, w, h) {this.handlerPanel.style.left = x + "px";this.handlerPanel.style.top = y + "px";this.handlerPanel.style.width = w + "px";this.handlerPanel.style.height = h + "px";},Show: function() {this._bodySize = Gys.StageSize();this._createMaskPanel(this._bodySize.width, this._bodySize.height);document.body.appendChild(this.handlerPanel);this.handlerPanel.style.opacity = "0.50";this.handlerPanel.style.filter = "Alpha(opacity=50);";this._beginInfo = { "x": event.x ? event.x : event.pageX, "y": event.y ? event.y : event.pageY, "w": this._endInfo.w / 20, "h": this._endInfo.h / 20 };this._endInfo = { "x": this._bodySize.width / 2 - this._endInfo.w / 2, "y": this._bodySize.height / 2 - this._endInfo.h / 2 - 50, "w": this._endInfo.w, "h": this._endInfo.h };this._currentInfo = { "x": event.x ? event.x : event.pageX, "y": event.y ? event.y : event.pageY, "w": this._endInfo.w / 20, "h": this._endInfo.h / 20 };this._show = true;this.timer.begin(50);},Hide: function() {this.handlerPanel.innerText = "";document.body.removeChild(this.maskPanel);this._show = false;this._currentInfo = { "x": this._endInfo.x, "y": this._endInfo.y, "w": this._endInfo.w, "h": this._endInfo.h };this.timer.begin(50);},_Clone: function(obj) {return { "x": obj.x, "y": obj.y, "w": obj.w, "h": obj.h };},onRender: function() {},_createMaskPanel: function(w, h) {this.maskPanel.style.backgroundColor = "#eee";this.maskPanel.style.marginTop = "0px";this.maskPanel.style.marginLeft = "0px";this.maskPanel.style.left = "0px";this.maskPanel.style.top = "0px";this.maskPanel.style.position = "absolute";this.maskPanel.style.zIndex = 800;this.maskPanel.style.opacity = "0.50";this.maskPanel.style.filter = "Alpha(opacity=50);";this.maskPanel.style.width = w + "px";this.maskPanel.style.height = h + "px";document.body.appendChild(this.maskPanel);}
};Gys.MsgBlackUser = function() {this.ajax = new Gys.Ajax("user.ashx?t=b1");this.msgbox = new Gys.MessageBox(320, 210);this.msgbox.onRender = this.onRender.createDelegate(this);};Gys.MsgBlackUser.prototype = {onRender: function(render) {render.innerHTML = "<p style='padding:12px'><span style='font-size:18px;'><b>我要屏蔽</b></span><p style='padding-left:40px;margin:0px;font-size:14px;line-height:25px;'>您确定要屏蔽 IQSOU 搜索页面？<br>屏蔽原因：" + "<textarea id='msg_black_txt' cols='2' rows='10' style='height: 55px;width:260px' ></textarea></p>" + "<div style='margin-left:100px;width:130px;margin-top:15px;'><img src='http://image.iqsou.com/images/but_ok.gif' id='msg_black_click' style='border-width:0;float:left;cursor:hand;' /><img src='http://image.iqsou.com/images/but_cancel.gif' style='cursor:hand;border-width:0;float:right' id='msg_black_cancel' /></div></p>";$("msg_black_cancel").onclick = this.msgbox.Hide.createDelegate(this.msgbox);$("msg_black_click").onclick = this.onClick.createDelegate(this);this.ajax.onData = this.onData.createDelegate(this);},Show: function() {this.msgbox.Show();},onData: function(Result) {if (Result == "0")
alert("提示！黑名单提交异常。");else {this.msgbox.Hide();alert("提示！黑名单提交成功。");}
},onClick: function() {this.ajax.Request();}
};Gys.MsgConfig = function() {this.msg_Arr = new Array();this.msg_Arr[0] = { title: "网页搜索", value: "0", select: ",", data: [{ t: "Google", v: "0" }, { t: "Baidu", v: "1" }, { t: "Sogou", v: "2" }, { t: "Soso", v: "3" }, { t: "Live", v: "4"}] };this.msg_Arr[1] = { title: "音乐搜索", value: "1", select: ",", data: [{ t: "Baidu", v: "0" }, { t: "Google", v: "1" }, { t: "中搜MP3", v: "2" }, { t: "Sogou", v: "3" }, { t: "有道搜索", v: "4" }, { t: "Task爱问", v: "5"}] };this.msg_Arr[2] = { title: "电影搜索", value: "2", select: ",", data: [{ t: "电驴", v: "0" }, { t: "Baidu", v: "1" }, { t: "射手网", v: "2" }, { t: "GouGou影视", v: "3" }, { t: "时光网", v: "5" }, { t: "Bt联盟", v: "6"}] };this.msg_Arr[3] = { title: "博客搜索", value: "3", select: ",", data: [{ t: "Google", v: "0" }, { t: "Baidu", v: "1" }, { t: "Sogou", v: "2" }, { t: "Task爱问", v: "3" }, { t: "有道搜索", v: "4" }, { t: "Booso", v: "5"}] };this.msg_Arr[4] = { title: "新闻搜索", value: "4", select: ",", data: [{ t: "Google", v: "0" }, { t: "Baidu", v: "1" }, { t: "Sogou", v: "2" }, { t: "有道搜索", v: "3" }, { t: "Task爱问", v: "4"}] };this.msg_Arr[5] = { title: "购  物", value: "5", select: ",", data: [{ t: "阿里巴巴", v: "0" }, { t: "当当网", v: "1" }, { t: "卓越网", v: "2" }, { t: "百度有阿", v: "3" }, { t: "京东商城", v: "4"}] };this.msgbox = new Gys.MessageBox(550, 420);this.msgbox.onRender = this.onRender.createDelegate(this);this.strValue = ",";this.cookies = new Gys.Cookies();};Gys.MsgConfig.prototype = {onRender: function(render) {this.render = render;this.render.innerHTML = "<div style=' width: 550px; height: 380px;'><div style='padding: 12px' id='msg_config'>"
+ "<div style='font-size: 18px; margin-bottom: 12px;'><b>个人设置</b></div><span id='msg_config_context'></span>"
+ "<img src='http://image.iqsou.com/images/msg_line.gif' style='width: 100%; height: 5px;' alt='' /><div style='margin-left: 180px; width: 130px; margin-top: 13px;'>"
+ "<img src='http://image.iqsou.com/images/but_ok.gif' style='border-width: 0; float: left; cursor: hand;' alt='确定' id='msg_black_click' />"
+ "<img src='http://image.iqsou.com/images/but_cancel.gif' style='cursor: hand;border-width: 0; float: right' id='msg_black_cancel' alt='取消' /></div></div></div>";$("msg_black_cancel").onclick = this.msgbox.Hide.createDelegate(this.msgbox);$("msg_black_click").onclick = this.onSend.createDelegate(this);var n, i;var ctrLi, ctrCheck, ctrLabel, ctrContext, ctrUl, ctrTd, ctrTr, ctrTb;var tmpArr;ctrContext = $("msg_config_context");ctrTb = document.createElement("table");ctrTb.style.width = "100%";ctrTb.cellSpacing = "0px";ctrTb.cellPadding = "5px";ctrTb.style.fontSize = "10.5pt";for (n = 0; n < this.msg_Arr.length; n++) {this.msg_Arr[n].select = ",";ctrTr = ctrTb.insertRow(n);if (n % 2 == 0)
ctrTr.className = "msg_config_tr_a";else
ctrTr.className = "msg_config_tr_b";ctrTd = ctrTr.insertCell(0);ctrTd.innerText = this.msg_Arr[n].title;ctrTd.className = "msg_config_title";ctrTd = ctrTr.insertCell(1);ctrUl = document.createElement("ul");tmpArr = this.msg_Arr[n].data;for (i = 0; i < tmpArr.length; i++) {ctrLi = document.createElement("li");ctrLi.className = "msg_config_check";ctrCheck = document.createElement("input");ctrCheck.type = "checkbox";ctrCheck.id = "msg_config_ul" + n + "check" + i;ctrCheck.value = tmpArr[i].v;ctrCheck.onclick = this.setValues.createDelegate(this, [{ sender: ctrCheck, data: this.msg_Arr[n]}]);ctrLabel = document.createElement("label");ctrLabel.innerText = tmpArr[i].t;ctrLabel.htmlFor = "msg_config_ul" + n + "check" + i;ctrLi.appendChild(ctrCheck);ctrLi.appendChild(ctrLabel);ctrUl.appendChild(ctrLi);}
ctrTd.appendChild(ctrUl);}
ctrContext.appendChild(ctrTb);},Show: function() {this.msgbox.Show();},setValues: function(args) {if (args.data.select.indexOf(args.sender.value) > 0) {args.data.select = args.data.select.replace("," + args.sender.value + ",", ",");}
else if (args.data.select.split(",").length <= 3) {args.data.select += args.sender.value + ",";}
else {alert("提示！同一搜索类型只能设置2个搜索引擎。");return false;}
},onSend: function() {var result = "";for (var i = 0; i < this.msg_Arr.length; i++) {if (this.msg_Arr[i].select != ",") {result = this.msg_Arr[i].select.substr(1, this.msg_Arr[i].select.length - 2);if (result.indexOf(",") < 0) {result = result + ",-1";}
this.cookies.setCookies("c"+this.msg_Arr[i].value, result);}
}
this.msgbox.Hide();}
};Gys.Frame = function(name, x, y, w, h) {this.frame;this.data;this.hide = true;this._create(name);this.locationSize(x, y, w, h);};Gys.Frame.prototype ={_create: function(name) {document.write("<iframe id=\"" + name + "\" style=\"position:absolute;\"></iframe>");this.frame = document.getElementById(name);this.frame.frameborder = "0";},locationSize: function(x, y, w, h) {this.frame.style.left = x;this.frame.style.top = y;this.frame.style.width = w + "px";this.frame.style.height = h + "px";},Show: function(bool) {if (bool) {this.frame.style.display = "block";this.hide = true;}
else {this.frame.style.display = "none";this.hide = false;}
},Src: function(src) {this.frame.src = "r.ashx?" + src;}
}
Gys.Window = function() {var size = this.getFrameSize();this.left = new Gys.Frame("c_f_1", 0, 94, size.width, size.height);this.right = new Gys.Frame("c_f_2", size.width, 94, size.width, size.height);this.currentFrame = this.right;this.key;window.onresize = this.resize.createDelegate(this);this.timer = new Gys.Timer();this.timer.onTick = this.resize.createDelegate(this);this.timer.begin(500);window.onload = this.timer.stop.createDelegate(this);}
Gys.Window.prototype = {getFrameSize: function() {var winWidth = 0;var winHeight = 0;if (window.innerWidth)
winWidth = window.innerWidth;else if ((document.body) && (document.body.clientWidth))
winWidth = document.body.clientWidth;if (window.innerHeight)
winHeight = window.innerHeight;else if ((document.body) && (document.body.clientHeight))
winHeight = document.body.clientHeight;if (document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth) {winHeight = document.documentElement.clientHeight;winWidth = document.documentElement.clientWidth;}
return { width: winWidth / 2, height: winHeight - 94 };},setSrc: function(windowType, url, k) {if (!this.left.hide || !this.right.hide) {this.Show(windowType, true);}
if (windowType == Gys.Data.WindowType.left)
this.left.Src(this.urlFormat(url, k));else
this.right.Src(this.urlFormat(url, k));},urlFormat: function(url, key) {return url.replace("{0}", key);},Show: function(windowType, bool) {if (windowType == Gys.Data.WindowType.left)
this.left.Show(bool);else
this.right.Show(bool);var size = this.getFrameSize();if (bool) {if (windowType == Gys.Data.WindowType.left)
this.right.locationSize(size.width, 94, size.width, size.height);else
this.left.locationSize(0, 94, size.width, size.height);}
else {if (windowType == Gys.Data.WindowType.left) {this.right.locationSize(0, 94, size.width * 2, size.height);}
else {this.left.locationSize(0, 94, size.width * 2, size.height);}
}
},resize: function() {this.Show(Gys.Data.WindowType.left, this.left.hide);this.Show(Gys.Data.WindowType.right, this.right.hide);}
};Gys.Ajax = function(url) {this.xmlhttp;this.url = url;};Gys.Ajax.prototype = {Request: function() {if (window.ActiveXObject) {try {this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");}
catch (e) {try {this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}
catch (E) {}
}
}
else {}
if (!this.xmlhttp && typeof XMLHttpRequest != 'undefined') {try {this.xmlhttp = new XMLHttpRequest();}
catch (e) {}
}
this.xmlhttp.onreadystatechange = this.ReadyStateChange.createDelegate(this);this.xmlhttp.open("GET", this.url, true);this.xmlhttp.send();},ReadyStateChange: function() {if (this.xmlhttp.readyState == 4) {if (this.xmlhttp.status == 200) { this.onData(this.xmlhttp.responseText); }
}
},onData: function(Result) {},GetContext: function() {var PageContext = xmlhttp.responseText;alert(PageContext);}
};Gys.Cookies = function() {};Gys.Cookies.prototype =
{getCookies : function(name)
{var cookieArray = document.cookie.split(";");var cookie=new Object();for(var i=0;i<cookieArray.length;i++)
{var arr=cookieArray[i].split("=");if(arr[0] == " "+name)
return unescape(arr[1]);}
return "none";},setCookies : function(name,value)
{var Days = 360*10;var exp = new Date();exp.setTime(exp.getTime() + Days*24*60*60*1000);var str=name.toString()+"="+escape(value)+";expires=" + exp.toGMTString();document.cookie=str;},delCookie : function(name)
{var exp = new Date();exp.setTime(exp.getTime() - 1);var cval=Cookie.getCookies(name);if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();}
};Gys.Data = Gys.$Bind(Object, {ButtonType: {Search: 0,Web: 1,Ad: 2,Line: 3
},WindowType:{none: -1,left: 0,right: 1
},createSearch: function(list, title, down, up, src) {var o = new Object();o.title = title;o.down = down;o.up = up;o.src = src;o.type = this.ButtonType.Serach;o.state = 0;o.img = null;o.frame = null;o.window = null;list.push(o);},createLine: function(list) {list.push({ type: this.ButtonType.Line });},createWeb: function(list, title, down, src) {var o = new Object();o.title = title;o.down = down;o.src = src;o.type = this.ButtonType.Web;list.push(o);}
});var location = new Object();var Items = {Page: { name: "网页", data: new Array() },Music: { name: "音乐", data: new Array() },Movie: { name: "电影", data: new Array() },Blog: { name: "博客", data: new Array() },News: { name: "新闻", data: new Array() },Shop: { name: "购物", data: new Array() },More: { name: "更多", data: "cd.iqsou.com"}
}
function initItems() {Gys.Data.createSearch(Items.Page.data, "Google搜索", "images/1_g.png", "images/1_g1.png", "r=a2&q={0}&h=utf8");if (searchID == "sc" || searchID == "cd_iqsou" || searchID == "iqs")
Gys.Data.createSearch(Items.Page.data, "百度搜索", "images/1_b.png", "images/1_b1.png", "r=a3&q={0}");else if (searchID == "sc_iqsou")
Gys.Data.createSearch(Items.Page.data, "百度搜索", "images/1_b.png", "images/1_b1.png", "r=a3a&q={0}");else if (searchID == "cq")
Gys.Data.createSearch(Items.Page.data, "百度搜索", "images/1_b.png", "images/1_b1.png", "r=a3b&q={0}");else if (searchID == "cq_iqsou")
Gys.Data.createSearch(Items.Page.data, "百度搜索", "images/1_b.png", "images/1_b1.png", "r=a3c&q={0}");else if (searchID == "xj")
Gys.Data.createSearch(Items.Page.data, "百度搜索", "images/1_b.png", "images/1_b1.png", "r=a3d&q={0}");else
Gys.Data.createSearch(Items.Page.data, "百度搜索", "images/1_b.png", "images/1_b1.png", "r=a3&q={0}");if (defaultSource == "as")
Gys.Data.createSearch(Items.Page.data, "SoGou搜索", "images/1_sg.png", "images/1_sg1.png", "r=a41&q={0}");else
Gys.Data.createSearch(Items.Page.data, "SoGou搜索", "images/1_sg.png", "images/1_sg1.png", "r=a4&q={0}");Gys.Data.createSearch(Items.Page.data, "SOSO搜索", "images/1_s.png", "images/1_s1.png", "r=a5&q={0}");Gys.Data.createSearch(Items.Page.data, "LiveSearch", "images/1_l.png", "images/1_l1.png", "r=a1&q={0}&h=utf8");Gys.Data.createSearch(Items.Page.data, "114", "images/1_114.png", "images/1_1141.png", "r=a114&q={0}");Gys.Data.createSearch(Items.Page.data, "Yahoo搜索", "images/1_y.png", "images/1_y1.png", "r=a6&q={0}");Gys.Data.createLine(Items.Page.data);Gys.Data.createWeb(Items.Page.data, "Yahoo搜索", "images/1_01.png", "www.iqsou.com/");Gys.Data.createSearch(Items.Music.data, "百度搜索", "images/1_b.png", "images/1_b1.png", "r=b1&q={0}");Gys.Data.createSearch(Items.Music.data, "Google搜索", "images/1_g.png", "images/1_g1.png", "r=b2&q={0}&h=utf8");Gys.Data.createSearch(Items.Music.data, "中搜MP3", "images/1_z.png", "images/1_z1.png", "r=b3&q={0}");Gys.Data.createSearch(Items.Music.data, "SOGOU搜狗", "images/1_sg.png", "images/1_sg1.png", "r=b4&q={0}");Gys.Data.createSearch(Items.Music.data, "有道搜索", "images/1_d.png", "images/1_d1.png", "r=b5&q={0}");Gys.Data.createSearch(Items.Music.data, "Task搜索", "images/1_a.png", "images/1_a1.png", "r=b6&q={0}");Gys.Data.createSearch(Items.Movie.data, "VeryCD电驴", "images/1_v.png", "images/1_v1.png", "r=c2&q={0}");Gys.Data.createSearch(Items.Movie.data, "百度", "images/1_b.png", "images/1_b1.png", "r=c5&q={0}");Gys.Data.createSearch(Items.Movie.data, "射手网", "images/1_ss.png", "images/1_ss1.png", "r=c4&q={0}");Gys.Data.createSearch(Items.Movie.data, "GOUGOU影视", "images/1_gg.png", "images/1_gg1.png", "r=c1&q={0}");Gys.Data.createSearch(Items.Movie.data, "时光网", "images/1_m.png", "images/1_m1.png", "r=c6&q={0}");Gys.Data.createSearch(Items.Movie.data, "BT联盟", "images/1_bt.png", "images/1_bt1.png", "r=c7&q={0}");Gys.Data.createSearch(Items.Blog.data, "Google搜索", "images/1_g.png", "images/1_g1.png", "r=d1&q={0}");Gys.Data.createSearch(Items.Blog.data, "百度搜索", "images/1_b.png", "images/1_b1.png", "r=d2&q={0}");Gys.Data.createSearch(Items.Blog.data, "搜狗", "images/1_sg.png", "images/1_sg1.png", "r=d3&q={0}");Gys.Data.createSearch(Items.Blog.data, "Task爱问", "images/1_a.png", "images/1_a1.png", "r=d4&q={0}");Gys.Data.createSearch(Items.Blog.data, "有道搜索", "images/1_d.png", "images/1_d1.png", "r=d5&q={0}");Gys.Data.createSearch(Items.Blog.data, "Booso搜索", "images/1_bs.png", "images/1_bs1.png", "r=d6&q={0}&h=utf8");Gys.Data.createSearch(Items.News.data, "Google搜索", "images/1_g.png", "images/1_g1.png", "r=e1&q={0}&h=utf8");Gys.Data.createSearch(Items.News.data, "百度搜索", "images/1_b.png", "images/1_b1.png", "r=e2&q={0}");Gys.Data.createSearch(Items.News.data, "Sogou搜狗", "images/1_sg.png", "images/1_sg1.png", "r=e3&q={0}");Gys.Data.createSearch(Items.News.data, "有道搜索", "images/1_d.png", "images/1_d1.png", "r=e4&q={0}&h=utf8");Gys.Data.createSearch(Items.News.data, "Task爱问", "images/1_a.png", "images/1_a1.png", "r=e5&q={0}");Gys.Data.createSearch(Items.Shop.data, "阿里巴巴", "images/1_al.png", "images/1_al1.png", "r=f4&q={0}");Gys.Data.createSearch(Items.Shop.data, "当当网", "images/1_dd.png", "images/1_dd1.png", "r=f1&q={0}");Gys.Data.createSearch(Items.Shop.data, "卓越网", "images/1_zy.png", "images/1_zy1.png", "r=f3&q={0}");Gys.Data.createSearch(Items.Shop.data, "百度有啊", "images/1_ya.png", "images/1_ya1.png", "r=f5&q={0}");Gys.Data.createSearch(Items.Shop.data, "京东商城", "images/1_jd.png", "images/1_jd1.png", "r=f7&q={0}");}
var mainButton = new Gys.MainButton(Items,$("H_mainBut"));var searchButton = new Gys.SearchButton($("H_bar_butlist"));var searchInput = new Gys.SearchInput($("H_q_txt"), $("H_s_but"));var msgBlackUser = new Gys.MsgBlackUser();var msgConfig = new Gys.MsgConfig();var gyWindow = new Gys.Window();var searchValue;var searchKey;var defaultRule;var defaultType;var defaultSource;var searchID;mainButton.onButClick = onMainButtonClick.createDelegate(this);searchButton.onDown = onSearchButtonDown.createDelegate(this);searchButton.onUp   = onSearchButtonUp.createDelegate(this);searchInput.onSearchInputClick = onSearchInputClick.createDelegate(this);function onMainButtonClick(e) {if (Gys.Core.isString(e.data)) {window.open("http://" + e.data);return;}
searchButton.create(e.data);var left = 0, right = 1;var cookies = new Gys.Cookies();var cookiesValue = cookies.getCookies("c" + e.type);if (cookiesValue != "none") {arr = cookiesValue.split(",");left = arr[0];right = arr[1];}
else if (defaultType == e.type) {if (this.defaultRule.indexOf(",") > 0) {var arr = this.defaultRule.split(",");left = arr[0];right = arr[1];}
}
if (left != -1)
searchButton.setMouseDown(left);else
gyWindow.left.hide = false;if (right != -1)
searchButton.setMouseDown(right);else
gyWindow.right.hide = false;if (left == "-1" || right == "-1")
gyWindow.resize();$("H_f_t").value = e.type;document.title = " IQSOU 搜罗天下 一步到位   " + searchKey;}
function onSearchButtonDown(e, type) {gyWindow.setSrc(type, e.src, searchValue);}
function onSearchButtonUp(e, type) {gyWindow.Show(type, false);}
function onSearchInputClick() {$("s_form").submit();}
$("H_helper_black").onclick = msgBlackUser.Show.createDelegate(msgBlackUser,event);$("H_helper_config").onclick = msgConfig.Show.createDelegate(msgConfig,event);function go(k, a, t, r, s, id) {searchInput.setKey(k);searchKey = k;searchID  = id;searchValue = a;if (!Gys.Core.isEmpty(id)) $("H_f_id").value = id;defaultSource = s;$("H_f_t").value = t;defaultRule = r;defaultType = t;initItems();mainButton.setButClick(t);}

