/*Javascript*/
var ajaxAvailable = false;
var xmlHttp = null;
initAjax();
var m_id=0;
function doR(id,r){ 
m_id = id;
if(ajaxAvailable){
doAjax('GET','http://www.boobsnboobs.com/arate.php?id='+id+'&r='+r,ratingResult);
return false;
}
return true;
}
//notinh
function ratingResult(data){
data=trim(data);
try{
var obj = document.getElementById('rholder_'+m_id);
if(data=="0"){
obj.innerHTML="Previously Rated!";
}else if(data=="1"){
obj.innerHTML="Rating Saved!";
}else{
alert(data);
}
}catch(e){
}
}
function doAjax(type,url,action){
xmlHttp.open(type,url, true); 
xmlHttp.onreadystatechange = function() { 
if (xmlHttp.readyState == 4) { 
action(xmlHttp.responseText);
} 
}
xmlHttp.send(null); 
}
function initAjax(){
try{
xmlHttp=new XMLHttpRequest();
}catch (e){
try{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}catch (e){
try{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}catch (e){
ajaxAvailable = false;
}
}
}
ajaxAvailable = true;
}

var ratingon = "http://www.boobsnboobs.com/images/ratingon.gif";
var ratingoff = "http://www.boobsnboobs.com/images/ratingoff.gif";
var obj;
function ron(id,rt){
for(x=1;x<=5;x++){
obj = document.getElementById(id+'_'+x);
obj.origSRC = obj.src;
obj.src = ratingoff;
}
for(x=1;x<=rt;x++){
obj = document.getElementById(id+'_'+x);
obj.src = ratingon;
}
}
function roff(id,rt){
for(x=1;x<=5;x++){
obj = document.getElementById(id+'_'+x);
obj.src = obj.origSRC;
}
}

function trim(str){
return str.replace(/^s+|s+$/g, '');
}


if (parent.frames.length > 0) 
{
	parent.location.href = location.href;
}




function GUI_ready(){
	if (top.location != location) {
		top.location.href = document.location.href ;
	}
	window.moveTo(0,0);
	if (document.all) {
		top.window.resizeTo(screen.availWidth,screen.availHeight);
	}
	else if (document.layers||document.getElementById) {
		if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth) {
			top.window.outerHeight = screen.availHeight;
			top.window.outerWidth = screen.availWidth;
		}
	}
}
function bookmarksite(){
	if (document.all) {
		window.external.AddFavorite("http://www.boobsnboobs.com/", "Boobs n Boobs");
	} else if (window.sidebar) {
		window.sidebar.addPanel("Boobs n Boobs", "http://www.boobsnboobs.com/","");
	}
}

function mo(o){o.className=='stateoff'?o.className='stateon': o.className=o.className;}
function mx(o){o.className=='stateon'?o.className='stateoff': o.className=o.className;}
function mc(o){o.className='stateclicked';}

function preurlrew(obj,pre,url){
	if (obj!=null) {
		obj.href=pre+url;
		return true;
	} else {
		return false;
	}
}


function custom_flipbg (id,o,color) {
	var obj=document.getElementById(id);
	if (obj) {
		if (o) {
			obj.style.backgroundColor=color;	
		} else {
			obj.style.backgroundColor="";	
		}
	}
}


function flipbg (id,o) {
	var obj=document.getElementById(id);
	if (obj) {
		if (o) {
			obj.style.backgroundColor="#0f0f0f";	
		} else {
			obj.style.backgroundColor="";	
		}
	}
}


function WritePlayer(divid,htmlopt){
	var htmlopt_str = new String(htmlopt); 
	var arr_htmlopt=htmlopt_str.split('|'); 
	var site=arr_htmlopt[0];
	if (site=="0") {
		var playerUrl="http://www.xxxymovies.com/xxxymoviesembedv1.swf";
		var fo=new SWFObject(playerUrl+"?vkey="+arr_htmlopt[1],"vplayer","480","380","9","#000000");
                fo.addParam("allowScriptAccess","always");
		return fo.write(divid);
	} else if (site=="1") {
		var playerUrl="http://www.homemadesexvidz.com/homemadesexvidzv4.swf";
		var fo=new SWFObject(playerUrl+"?vkey="+arr_htmlopt[1],"vplayer","480","380","9","#000000");
		return fo.write(divid);		
	} else {
		document.write('Unimplemented!');
		return;
	}
	return;
}

function WriteSiteSource(htmlopt) {
	var htmlopt_str = new String(htmlopt); 
	var arr_htmlopt=htmlopt_str.split('|'); 
	var site=arr_htmlopt[0];
        if (site=="0") {
            document.write("<a class=\"downlink\" href=\"http://www.xxxymovies.com/\" target=\"_blank\"");
            document.write(" title=\"XXX Movies\">Video Hosted By XXXYMovies.com</a>");
        } else if (site=="1"){
            document.write("<a class=\"downlink\" href=\"http://www.homemadesexvidz.com/\" target=\"_blank\"");
            document.write(" title=\"HomeMade Sex Videos\">Video Hosted By HomeMadeSexVidz.com</a>");
        } else {
		document.write('Unimplemented!');
		return;
        }
     return;
}






//GUI_ready();