//////////////////////////////////////////////////////////////////////////////////////////////////

isDOM=document.getElementById?true:false
isOpera=isOpera5=window.opera && isDOM
isOpera6=isOpera && window.print
isOpera7=isOpera && document.readyState
isMSIE=isIE=document.all && document.all.item && !isOpera
isStrict=document.compatMode=="CSS1Compat";
if (document.documentElement && document.documentElement.scrollTop) isStrict = true;
isNN=isNC=navigator.appName=="Netscape";
isNN4=isNC4=isNN && !isDOM
isMozilla=isNN6=isNN && isDOM
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
function AddFFSearchPlugin() {
/*  
   if ((typeof window.sidebar.addSearchEngine == "function") &&
		  (typeof window.sidebar == "object")) {
		  var file = "http://wowmanual.ru/wowsearch.xml";
		  var icon = "http://wowmanual.ru/template/favicon/favicon.png"; 

		  window.sidebar.addSearchEngine(file,icon,"WOW search","FFPlugin");
   }
   else alert("Your browser doesn't suppoert this function.");*/
	
	window.external.AddSearchProvider('http://wowmanual.ru/wowsearch.xml');  
   
}

//////////////////////////////////////////////////////////////////////////////////////////////////
function AddToFavs() {

	if (!isIE) return true;
	window.external.AddFavorite('http://wowmanual.ru/','База знаний WOW');
	return false;

}
function show_big(id, width, height)
{ 
 url = "http://wowmanual.ru/uploads/gallery/"+id+"_big.jpeg";
 window.open(url, "screen", "width="+width+", height="+height+", resizable=no, scrollbars=no");
}
function show_big_item(id, width, height)
{ 
 url = "http://wowmanual.ru/uploads/items/big/"+id+".jpeg";
 window.open(url, "screen", "width="+width+", height="+height+", resizable=no, scrollbars=no");
}
function show_big_item_set(id, width, height)
{ 
 url = "http://wowmanual.ru/uploads/items/sets_big/"+id+".jpeg";
 window.open(url, "screen", "width="+width+", height="+height+", resizable=no, scrollbars=no");
}
function show_big_npc(id, width, height)
{ 
 url = "http://wowmanual.ru/uploads/npcs/big/"+id+".jpeg";
 window.open(url, "screen", "width="+width+", height="+height+", resizable=no, scrollbars=no");
}
function show_npc_loc(id, loc, width, height)
{ 
 url = "http://wowmanual.ru/engine/user/view_map.php?id="+id+"&loc_id="+loc+"&big";
 window.open(url, "screen", "width="+width+", height="+height+", resizable=no, scrollbars=no");
}
function show_obj_loc(id, loc, width, height)
{ 
 url = "http://wowmanual.ru/engine/user/view_map.php?id="+id+"&loc_id="+loc+"&big&objects";
 window.open(url, "screen", "width="+width+", height="+height+", resizable=no, scrollbars=no");
}
function show_big_obj(id, width, height)
{ 
 url = "http://wowmanual.ru/uploads/objects/big/"+id+".jpeg";
 window.open(url, "screen", "width="+width+", height="+height+", resizable=no, scrollbars=no");
}
function show_big_addon(id, width, height)
{ 
 url = "http://wowmanual.ru/uploads/addons_pic/big/"+id+".jpeg";
 window.open(url, "screen", "width="+width+", height="+height+", resizable=no, scrollbars=no");
}
function gameLink(type, id, name, clr) {
	
	var s;
str_ingamelink_1 = 'Щелкните, удерживая клавишу Shift для отправки ссылки в окно чата: ';
str_ingamelink_2 = 'Скопируйте нижеприведенную ссылку и вставьте ее в окно чата';

	
	if (!clr) clr = 'a335ee';
	
	switch (type) {
		case 'item':
				s = '/script DEFAULT_CHAT_FRAME:AddMessage("'+
				    str_ingamelink_1+
					'\\124cff'+clr+'\\124H'+type+':'+id+':0:0:0:0:0:0:0\\124h['+name+']\\124h\\124r");';
				break;
				
		case 'quest':
				s = '/script DEFAULT_CHAT_FRAME:AddMessage("'+
				    str_ingamelink_1+
					'\\124cffffff00\\124H'+type+':'+id+':0:0:0:0:0:0:0\\124h['+name+']\\124h\\124r");';
				break;
			
	}

	prompt(str_ingamelink_2, s);
}