	function add() {
		var url = "http://www.hardsextube.com/opensearch.xml";
		window.external.AddSearchProvider(url);
	}

	    if (  typeof window.external == "object"
	       && typeof window.external.AddSearchProvider != "undefined" ) {
		var a = document.getElementById('addSearch');	
		if ( a != null ) { 
			a.style.display='block';
		}
	    }


  function replace(div,url) {
    var http = false;

    if(navigator.appName == "Microsoft Internet Explorer") {
      http = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
      http = new XMLHttpRequest();
    }

    document.getElementById(div).innerHTML = '<center>loading..</center>';
	try {
		   http.open("GET", url, true);
	} catch (err) { 
		return true;
	}
    http.onreadystatechange=function() {
      if(http.readyState == 4) {
	        document.getElementById(div).innerHTML = http.responseText;
      }
    }
    http.send(null);
  }


function gopage(page,div,data,type,addc,rows) {
    replace(div,'http://www.hardsextube.com/newcomments.php?data='+data+'&type='+type+'&page='+page+'&rows='+rows+'&div='+div+'&vis='+addc);
  }

  function nextpage(page,div,data,type,addc,rows) {
    page++;
    replace(div,'http://www.hardsextube.com/newcomments.php?data='+data+'&type='+type+'&page='+page+'&rows='+rows+'&div='+div+'&vis='+addc);
  }
  function prevpage(page,div,data,type,addc,rows) {
    if ( page ) { page--; }
    replace(div,'http://www.hardsextube.com/newcomments.php?data='+data+'&type='+type+'&page='+page+'&rows='+rows+'&div='+div+'&vis='+addc);
  }
  function load(page,div,data,type,addc,rows) {
    var page = 0;
    replace(div,'http://www.hardsextube.com/newcomments.php?data='+data+'&type='+type+'&page='+page+'&rows='+rows+'&div='+div+'&vis='+addc);
  }




