/*

Tool to convert HTML to Javascript Ready document.write tags:
http://javascript.about.com/library/tools/bldocwriter.htm

*/



/*
if (navigator.appName.indexOf("Microsoft") != -1) {
document.write('<link rel="stylesheet" type="text/css" href="media/css/ie_styles2.css">');
}
else {
document.write('<link rel="stylesheet" type="text/css" href="media/css/ns_styles2.css">');
}
*/



/* ----------------------------------------------------------- */
function quicklinks() {
d=document
d.write ("<option value='#'>Quick Links - .........</option>");
d.write ("<option value='#'>------------------------------------</option>");
d.write ("<option value='http://1-z.com/'>1-Z.com </option>");
d.write ("<option value='http://2movies.com/'>2Movies.com</option>");
}


/* ----------------------------------------------------------- */
function select_all()
{
var text_val=eval("document.selectform.domain");
text_val.focus();
text_val.select();
}


/* ----------------------------------------------------------- */
function hideDiv() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshow').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'hidden'; 
} 
else { // IE 4 
document.all.hideshow.style.visibility = 'hidden'; 
} 
} 
}

function showDiv() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshow').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.hideshow.style.visibility = 'visible'; 
} 
} 
} 

/* ----------------------------------------------------------- */
function OpenWindow(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=yes,width=600,height=300,left = 100,top = 100');");
}



/* ----------------------------------------------------------- */
function closewindow(){
//alert
oWindow = window.parent.close(); 
}



/* ----------------------------------------------------------- */
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}



/* ----------------------------------------------------------- */
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



/* ----------------------------------------------------------- */
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}



/* ----------------------------------------------------------- */
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



/* ----------------------------------------------------------- */
function MM_jumpMenu(targ,selObj,restore){ //v3.0
//eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
window . open (eval( "url='" + selObj . options [ selObj . selectedIndex ]. value + "'" ));
if (restore) selObj.selectedIndex=0;
}

/* ----------------------------------------------------------- */
// this.displayfreq=session or always

function informationbar(){
	this.displayfreq="session"
	this.content='<a href="javascript:informationbar.close()"><img src="/images/close_icon.gif" style="width: 19px; height: 19px; float: right; border: 0; margin-right: 5px" /></a>'
}

informationbar.prototype.setContent=function(data){
	this.content=this.content+data
	document.write('<div id="informationbar" style="top: -500px">'+this.content+'</div>')
}

informationbar.prototype.animatetoview=function(){
	var barinstance=this
	if (parseInt(this.barref.style.top)<0){
		this.barref.style.top=parseInt(this.barref.style.top)+5+"px"
		setTimeout(function(){barinstance.animatetoview()}, 50)
	}
	else{
		if (document.all && !window.XMLHttpRequest)
		this.barref.style.setExpression("top", 'document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px" : body.scrollTop+"px"')
	else
		this.barref.style.top=0
	}
}

informationbar.close=function(){
	document.getElementById("informationbar").style.display="none"
		document.cookie="infobarshown=-1;path=/"
}

informationbar.prototype.setfrequency=function(type){
	this.displayfreq=type
}

informationbar.prototype.initialize=function(){
	if (this.displayfreq=="session" && document.cookie.indexOf("infobarshown")==-1 || this.displayfreq=="always"){
		this.barref=document.getElementById("informationbar")
		this.barheight=parseInt(this.barref.offsetHeight)
		this.barref.style.top=this.barheight*(-1)+"px"
		this.animatetoview()
	}
}

window.onunload=function(){
	this.barref=null
}


/* ----------------------------------------------------------- */

jQuery(document).ready(function($){
    $(".nav2")
    .superfish({
        animation : { opacity:"show",height:"show"}
    })
    .find(">li:has(ul)") 
        .mouseover(function(){
            $("ul", this).bgIframe({opacity:false});
        })
        .find("a")
            .focus(function(){
                $("ul", $(".nav>li:has(ul)")).bgIframe({opacity:false});
            });
    $(".cats-list")
    .superfish({
        animation : { opacity:"show",height:"show"}
    })
    .find(">li:has(ul)") 
        .mouseover(function(){
            $("ul", this).bgIframe({opacity:false});
        })
        .find("a")
            .focus(function(){
                $("ul", $(".nav>li:has(ul)")).bgIframe({opacity:false});
            });
        $("#lavaLamp, #2, #3").lavaLamp({
            fx: "backout", 
            speed: 700,
            click: function(event, menuItem) {
                return true;
            }
        });
    });

/* ----------------------------------------------------------- */

last_tab = 'tab1';
function show(layerName) {
document.getElementById(layerName).style.display = '';
}

function hide(layerName) {
document.getElementById(layerName).style.display = 'none';
}

function show_next(tab_name) {
document.getElementById(last_tab).className = 'tab';
var curr = document.getElementById(tab_name);
curr.className='tab_hover';
hide(last_tab+'_data');
show(tab_name+'_data');
last_tab=tab_name;
}

//END


