    function loadSubmit() {

    ProgressImage = document.getElementById('progress_image');
    document.getElementById("progress").style.visibility = "visible";
    setTimeout("ProgressImage.src = ProgressImage.src",100);
    return true;

    } 



function fader(div_id) {
	if(faded == 0) {
		$('#'+div_id).fadeOut('fast');
		faded = 1;
		document.getElementById('optionsToggle').innerHTML = '<a href="#" onclick="fader(\'fadeOptions\')">more options</a>';

	}
	else {
		$('#'+div_id).fadeIn('fast');
		faded = 0;
		document.getElementById('optionsToggle').innerHTML = '<a href="#" onclick="fader(\'fadeOptions\')">less options</a>';

		}
}






// JAVASCRIPT FROM JS.JS » ds

$(document).ready(function(){
	
	$("a[rel^='prettyPhoto']").prettyPhoto({
		opacity: 1,
		showTitle: false
										   
	});
	
	$("#advanced a").click(function(){
			$("fadeOptions").fadeIn('slow'); },
			function(){
			$("fadeOptions").fadeOut('slow'); 
	});
						   
	
});


// DD
var smooth_timer;

function smoothHeight(id, curH, targetH, stepH, mode) {
  diff = targetH - curH;
  if (diff != 0) {
    newH = (diff > 0) ? curH + stepH : curH - stepH;
    ((document.getElementById) ? document.getElementById(id) : eval("document.all['" + id + "']")).style.height = newH + "px";
    if (smooth_timer) window.clearTimeout(smooth_timer);
    smooth_timer = window.setTimeout( "smoothHeight('" + id + "'," + newH + "," + targetH + "," + stepH + ",'" + mode + "')", 16 );
  }
  else if (mode != "o") ((document.getElementById) ? document.getElementById(mode) : eval("document.all['" + mode + "']")).style.display="none";
}

function rowOver(i, nColor) {
  if (!nColor) nColor = "#000000";
  var nameObj = (document.getElementById) ? document.getElementById('name' + i) : eval("document.all['name" + i + "']");
  if (nameObj != null) nameObj.style.background=nColor;
}

function rowOut(i, nColor) {
  var trObj = (document.getElementById) ? document.getElementById('ihtr' + i) : eval("document.all['ihtr" + i + "']");
  var nameObj = (document.getElementById) ? document.getElementById('name' + i) : eval("document.all['name" + i + "']");
  if (trObj == null || trObj.style.display=="none") nameObj.style.background=nColor;
}

function servOC(i, href, nColor) {
  var trObj = (document.getElementById) ? document.getElementById('ihtr' + i) : eval("document.all['ihtr" + i + "']");
  var nameObj = (document.getElementById) ? document.getElementById('name' + i) : eval("document.all['name" + i + "']");
  var ifObj = (document.getElementById) ? document.getElementById('ihif' + i) : eval("document.all['ihif" + i + "']");
  if (trObj != null) {
    if (trObj.style.display=="none") {
      ifObj.style.height = "0px";
      trObj.style.display="";
      
      if (!ifObj.src) ifObj.src = href;
      smoothHeight('ihif' + i, 0, 420, 42, 'o');
    }
    else {
      
      smoothHeight('ihif' + i, 420, 0, 42, 'ihtr' + i);
    }
  }
}
 
function addPlugin() {
	window.external.AddSearchProvider("http://beta.scrapetorrent.com/plugin/opensearch_desc.xml");
}

function addEngine(name,ext,cat)
{if((typeof window.sidebar=="object")&&(typeof
window.sidebar.addSearchEngine=="function"))
{window.sidebar.addSearchEngine("http://www.scrapetorrent.com/plugin/"+name+".src","http://www.scrapetorrent.com/plugin/"+name+"."+ext,name,cat);}
else
{errorMsg(name,ext,cat);}}

