﻿function global_init(){
	if(!document.getElementsByTagName) return;
	if(typeof(init) == "function") init();
	var anchors = document.getElementsByTagName("a");
	for(var i=0; i<anchors.length; i++){
		var anchor = anchors[i];
		var rel = anchor.getAttribute("rel");
		if(anchor.getAttribute("href") && (rel == "external" || rel == "nofollow"))
		anchor.target = "_blank";
	}
}

function addEngine(){
	if((typeof window.sidebar=="object") && (typeof window.sidebar.addSearchEngine=="function")){
		window.sidebar.addSearchEngine(
			"http://bt.xbox-sky.cc/mozilla/xbox-sky.src",
			"http://bt.xbox-sky.cc/mozilla/xbox-sky.gif",
			"Xbox-Sky Tracker",
			"Torrent");
	}else{
		alert("Sorry, you need a Mozilla-based browser to install a search plugin.");
	}
}

function fetch_object(item){
	if(document.all) return document.all[item];
	if(document.layers) return document.layers[item];
	if(document.getElementById) return document.getElementById(item);
	return false;
}

