// Rude Flash Slide Up Ad //
var rtw = 0;
var rth = 0;
var cas = 0;
var rIsIE = navigator.appName.indexOf("Microsoft") != -1;

window.onresize = function(){
    // code for slide up ads
    try{
        if(cas == 1){
            sfsua(1);
        }
    }
    catch(err){
        //txt="There was an error on this page.\n\n";
        //txt+="Error description: " + err.description + "\n\n";
        //txt+="Click OK to continue.\n\n";
        //alert(txt);
    }
    // code for pop up ads
    try{
        if(rffadon == 1){ 
            rcdad(500,350,'rffad'); 
        } 
    }
    catch(err){
        //txt="There was an error on this page.\n\n";
         //txt+="Error description: " + err.description + "\n\n";
          //txt+="Click OK to continue.\n\n";
          //alert(txt);
      }
}

window.onscroll = function(){
    // code for slide up ads
    try{
        if(cas == 1){
            sd();
        }
    }
    catch(err){
        //txt="There was an error on this page.\n\n";
         //txt+="Error description: " + err.description + "\n\n";
          //txt+="Click OK to continue.\n\n";
          //alert(txt); 
    }
    // code for pop up ads
    try{
        if(rffadon == 1){ 
            rcdad(500,350,'rffad'); 
        } 
    }
    catch(err){
        //txt="There was an error on this page.\n\n";
         //txt+="Error description: " + err.description + "\n\n";
          //txt+="Click OK to continue.\n\n";
          //alert(txt);
    }
}


function sd(){
	if(rIsIE){
		rtw = (document.body.clientWidth - 210) + document.body.scrollLeft;
		rth = (document.body.clientHeight - 120) + document.body.scrollTop;
		document.getElementById("fpa").style.left = rtw;
		document.getElementById("fpa").style.top = rth;
	} else {
		rtw = (window.innerWidth - 215) + window.pageXOffset;
		rth = (window.innerHeight - 125) + window.pageYOffset;
		document.getElementById("fpa").style.left = rtw + 'px';
		document.getElementById("fpa").style.top = rth + 'px';
	}
}

function gfm(movieName){
	if(rIsIE){
		return window[movieName];
	} else {
		if(document[movieName].length != undefined){
			return document[movieName][1];
		} else {
			return document[movieName];
		}
	}
}

function sfv(val) {
	gfm("embed_slide_up").stf(val);
}

function sfsua(p){	
	if(p == 1){
		cas = 1;
		if(rIsIE){
			rtw = document.body.clientWidth - 210;
			rth = document.body.clientHeight - 120;
			document.getElementById("fpa").style.left = rtw;
			document.getElementById("fpa").style.top = rth;	
		} else {
			rtw = window.innerWidth - 215;
			rth = window.innerHeight - 125;
			document.getElementById("fpa").style.left = rtw + 'px';
			document.getElementById("fpa").style.top = rth + 'px';
		}
	} else {
		rtw = -200;
		rth = -200;
		if(rIsIE){
			document.getElementById("fpa").style.left = rtw;
			document.getElementById("fpa").style.top = rth;
		} else {
			document.getElementById("fpa").style.left = rtw + 'px';
			document.getElementById("fpa").style.top = rth + 'px';
		}
	}
}