<!--

function SelectLink(link,selected,restore){
  var script_name = window.location.pathname;
  var replace_value = "/" + selected.options[selected.selectedIndex].value + "/";
  if(!script_name.match(replace_value)){

        script_name = script_name.replace(/\/thumbs\//i, replace_value);
        script_name = script_name.replace(/\/text\//i, replace_value);
        script_name = script_name.replace(/\/\//, "/");
        eval("location='"+script_name+"'");
        if (restore) selected.selectedIndex=0;
  }
}
function ChangeGallery(link,selected,restore){
  eval(link+".location='"+selected.options[selected.selectedIndex].value+"'");
  if (restore) selected.selectedIndex=0;
}


function logIn()
{
	parent.location = 'http://www.naughty.com/login/?JOIN=' + parent.location;

}
function hideIt(szDivID,URL) 
{
    attach_file('/Favorites.phtml?URL=' + URL);
    if(document.layers)	   //NN4+
    {
	document.layers[szDivID].innerHTML = "Added";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.innerHTML = "Added";
    }
    else if(document.all)	// IE 4
    {
	document.all[szDivID].innerHTML = "Added";
    }
}
function reportBad(szDivID, URL, TYPE)
{
	var win = '/report_bad.phtml?URL=' + URL + '&TYPE=' + TYPE;

    if(document.layers)    //NN4+
    {
	document.layers[szDivID].style.bottom = "151";
	document.layers[szDivID].innerHTML= "Reported";
    }
    else if(document.getElementById)      //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
	obj.style.bottom = "151";
	obj.innerHTML = "Reported";
    }
    else if(document.all)       // IE 4
    {
	document.all[szDivID].style.bottom = "151";
	document.all[szDivID].innerHTML = "Reported";
    }
win1= window.open(win,"under","width=800,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,screenX=150,screenY=125,left=150,top=125',scrollbars=auto,resizeable=no");

}
function attach_file( p_script_url ) {
	if (checkBrowser('msie')){
        	script = document.createElement( 'script' );
        	script.src = p_script_url;
	}else{
		frames['Favorites'].location.href=p_script_url;
	}
}
function removeIt(szDivID, URL)
{
    attach_file('/FavoritesRemove.phtml?URL=' + URL);
    if(document.layers)    //NN4+
    {
	document.layers[szDivID].innerHTML = "<BR>Removed";
    }
    else if(document.getElementById)      //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
	obj.innerHTML = "<BR>Removed";
    }
    else if(document.all)       // IE 4
    {
	document.all[szDivID].innerHTML = "<BR>Removed";
    }
}
function Pointer(){ document.body.style.cursor = "hand"; }
function DefaultCursor(){ document.body.style.cursor = "default"; }
function checkBrowser(string)
{
	var detect = navigator.userAgent.toLowerCase();
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
// -->

