/*
Iframe content loading gracefully provided by Gary Fung - email: gary{REPLACE_WITH_THE_AT_SIGN}isohunt.com
Feel free to use / mod this to your heart's content,
but you must keep these lines to acknowledge where this code originated.
Comments, mods or additions you'd like add to this script? Post it here:
http://isohunt.com/forum/viewforum.php?f=1
*/
lastObj=0;
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 urlObj = (document.getElementById) ? document.getElementById('linkje' + i) : eval("document.all['linkje" + i + "']");
  var ifObj = (document.getElementById) ? document.getElementById('ihif' + i) : eval("document.all['ihif" + i + "']")
  
  if (trObj != null) {
    if (trObj.style.display=="none") {
      trObj.style.display="";
     // nameObj.classname=('roselink');
      //urlObj.style.color="#ff0099";
     urlObj.className=('textrose');
      if (!ifObj.src) {ifObj.src = href;}
      ((document.getElementById) ? document.getElementById('ihif'+i) : eval("document.all['ihif" + i + "']")).style.height = "500px";
      
    }
    else {
    urlObj.className=('');
    ((document.getElementById) ? document.getElementById('ihif'+i) : eval("document.all['ihif" + i + "']")).style.height = "0px";
    ((document.getElementById) ? document.getElementById('ihtr' + i) : eval("document.all['ihtr" + i + "']")).style.display="none";
    }
  }

  if(lastObj && lastObj!=i){
  
    var oldurlObj = (document.getElementById) ? document.getElementById('linkje' + lastObj) : eval("document.all['linkje" + lastObj + "']");
      oldurlObj.className=('');
    ((document.getElementById) ? document.getElementById('ihif'+lastObj) : eval("document.all['ihif" + lastObj + "']")).style.height = "0px";
    ((document.getElementById) ? document.getElementById('ihtr' + lastObj) : eval("document.all['ihtr" + lastObj + "']")).style.display="none";

    }
  lastObj=i;
}

function next(){
	if(lastObj+1<=theprojects.length){
		servOC(lastObj+1, 'content.php?id='+theprojects[lastObj],"#e5e5e5e5");
		}
}

function prev(){
	if(lastObj-1>=1){
		servOC(lastObj-1, 'content.php?id='+theprojects[lastObj],"#e5e5e5e5");
		}
}

