// JavaScript Document
function	mouseov(x, y)	{
	document.getElementById(x+'1').className='img-over1';
	document.getElementById(x+'2').className='img-over2';
	document.getElementById(x+'3').className='img-over3';
	document.getElementById(y).className='hl-over';
}

function	mouseot(x, y)	{
	document.getElementById(x+'1').className='img1';
	document.getElementById(x+'2').className='img2';
	document.getElementById(x+'3').className='img3';
	document.getElementById(y).className='hl';
}

flags=1;
function showhide(i)	{
	if(flags==1)	{
		document.getElementById(i).className='ws-show';
		flags++;
	}
	else	{
		document.getElementById(i).className='ws-hide';
		flags=1;
	}
	return flags;
}

function dnpft(dnp)
{
	if(dnp=='f1')
	{
		document.getElementById('dnpft1').className='ws-dnp-over';
		document.getElementById('dnpft2').className='ws-dnp-out';
		document.getElementById('dnpft3').className='ws-dnp-out';
		document.getElementById('dnpft4').className='ws-dnp-out';
		document.getElementById('dnpft5').className='ws-dnp-out';
		document.getElementById('dnpft6').className='ws-dnp-out';
		document.getElementById('dnptd1').className='ws-show';
		document.getElementById('dnptd2').className='ws-hide';
		document.getElementById('dnptd3').className='ws-hide';
		document.getElementById('dnptd4').className='ws-hide';
		document.getElementById('dnptd5').className='ws-hide';
		document.getElementById('dnptd6').className='ws-hide';
		
	}
	if(dnp=='f2')
	{
		document.getElementById('dnpft2').className='ws-dnp-over';
		document.getElementById('dnpft3').className='ws-dnp-out';
		document.getElementById('dnpft4').className='ws-dnp-out';
		document.getElementById('dnpft5').className='ws-dnp-out';
		document.getElementById('dnpft6').className='ws-dnp-out';
		document.getElementById('dnpft1').className='ws-dnp-out';
		document.getElementById('dnptd2').className='ws-show';
		document.getElementById('dnptd3').className='ws-hide';
		document.getElementById('dnptd4').className='ws-hide';
		document.getElementById('dnptd5').className='ws-hide';
		document.getElementById('dnptd6').className='ws-hide';
		document.getElementById('dnptd1').className='ws-hide';
	}
	if(dnp=='f3')
	{
		document.getElementById('dnpft3').className='ws-dnp-over';
		document.getElementById('dnpft4').className='ws-dnp-out';
		document.getElementById('dnpft5').className='ws-dnp-out';
		document.getElementById('dnpft6').className='ws-dnp-out';
		document.getElementById('dnpft1').className='ws-dnp-out';
		document.getElementById('dnpft2').className='ws-dnp-out';
		document.getElementById('dnptd3').className='ws-show';
		document.getElementById('dnptd4').className='ws-hide';
		document.getElementById('dnptd5').className='ws-hide';
		document.getElementById('dnptd6').className='ws-hide';
		document.getElementById('dnptd1').className='ws-hide';
		document.getElementById('dnptd2').className='ws-hide';
	}
	if(dnp=='f4')
	{
		document.getElementById('dnpft4').className='ws-dnp-over';
		document.getElementById('dnpft5').className='ws-dnp-out';
		document.getElementById('dnpft6').className='ws-dnp-out';
		document.getElementById('dnpft1').className='ws-dnp-out';
		document.getElementById('dnpft2').className='ws-dnp-out';
		document.getElementById('dnpft3').className='ws-dnp-out';
		document.getElementById('dnptd4').className='ws-show';
		document.getElementById('dnptd5').className='ws-hide';
		document.getElementById('dnptd6').className='ws-hide';
		document.getElementById('dnptd1').className='ws-hide';
		document.getElementById('dnptd2').className='ws-hide';
		document.getElementById('dnptd3').className='ws-hide';
	}
	if(dnp=='f5')
	{
		document.getElementById('dnpft5').className='ws-dnp-over';
		document.getElementById('dnpft6').className='ws-dnp-out';
		document.getElementById('dnpft1').className='ws-dnp-out';
		document.getElementById('dnpft2').className='ws-dnp-out';
		document.getElementById('dnpft3').className='ws-dnp-out';
		document.getElementById('dnpft4').className='ws-dnp-out';
		document.getElementById('dnptd5').className='ws-show';
		document.getElementById('dnptd6').className='ws-hide';
		document.getElementById('dnptd1').className='ws-hide';
		document.getElementById('dnptd2').className='ws-hide';
		document.getElementById('dnptd3').className='ws-hide';
		document.getElementById('dnptd4').className='ws-hide';
	}
	if(dnp=='f6')
	{
		document.getElementById('dnpft6').className='ws-dnp-over';
		document.getElementById('dnpft1').className='ws-dnp-out';
		document.getElementById('dnpft2').className='ws-dnp-out';
		document.getElementById('dnpft3').className='ws-dnp-out';
		document.getElementById('dnpft4').className='ws-dnp-out';
		document.getElementById('dnpft5').className='ws-dnp-out';
		document.getElementById('dnptd6').className='ws-show';
		document.getElementById('dnptd1').className='ws-hide';
		document.getElementById('dnptd2').className='ws-hide';
		document.getElementById('dnptd3').className='ws-hide';
		document.getElementById('dnptd4').className='ws-hide';
		document.getElementById('dnptd5').className='ws-hide';
	}
}

function slabsprices(dnp)
{
	//alert(dnp);
	if(dnp=='domains')
	{
		document.getElementById('domains').className='slab-pricing ws-show';
		document.getElementById('hosting').className='slab-pricing ws-hide';
		document.getElementById('servers').className='slab-pricing ws-hide';
		document.getElementById('vps').className='slab-pricing ws-hide';
		document.getElementById('email').className='slab-pricing ws-hide';
		document.getElementById('ssl').className='slab-pricing ws-hide';
		document.getElementById('dm1').className='ws-show';
		document.getElementById('slab-dm1').className='ws-dnp-over';
		
	}
	if(dnp=='hosting')
	{
		document.getElementById('domains').className='slab-pricing ws-hide';
		document.getElementById('hosting').className='slab-pricing ws-show';
		document.getElementById('servers').className='slab-pricing ws-hide';
		document.getElementById('vps').className='slab-pricing ws-hide';
		document.getElementById('email').className='slab-pricing ws-hide';
		document.getElementById('ssl').className='slab-pricing ws-hide';
		document.getElementById('ht1').className='ws-show';
		document.getElementById('slab-ht1').className='ws-dnp-over';
	}
	if(dnp=='servers')
	{
		document.getElementById('domains').className='slab-pricing ws-hide';
		document.getElementById('hosting').className='slab-pricing ws-hide';
		document.getElementById('servers').className='slab-pricing ws-show';
		document.getElementById('vps').className='slab-pricing ws-hide';
		document.getElementById('email').className='slab-pricing ws-hide';
		document.getElementById('ssl').className='slab-pricing ws-hide';
		document.getElementById('sv1').className='ws-show';
		document.getElementById('slab-sv1').className='ws-dnp-over';
	}
	if(dnp=='vps')
	{
		document.getElementById('domains').className='slab-pricing ws-hide';
		document.getElementById('hosting').className='slab-pricing ws-hide';
		document.getElementById('servers').className='slab-pricing ws-hide';
		document.getElementById('vps').className='slab-pricing ws-show';
		document.getElementById('email').className='slab-pricing ws-hide';
		document.getElementById('ssl').className='slab-pricing ws-hide';
		document.getElementById('vps1').className='ws-show';
		document.getElementById('slab-vps1').className='ws-dnp-over';
	}
	if(dnp=='email')
	{
		document.getElementById('domains').className='slab-pricing ws-hide';
		document.getElementById('hosting').className='slab-pricing ws-hide';
		document.getElementById('servers').className='slab-pricing ws-hide';
		document.getElementById('vps').className='slab-pricing ws-hide';
		document.getElementById('email').className='slab-pricing ws-show';
		document.getElementById('ssl').className='slab-pricing ws-hide';
		document.getElementById('em1').className='ws-show';
		document.getElementById('slab-em1').className='ws-dnp-over';
	}
	if(dnp=='ssl')
	{
		document.getElementById('domains').className='slab-pricing ws-hide';
		document.getElementById('hosting').className='slab-pricing ws-hide';
		document.getElementById('servers').className='slab-pricing ws-hide';
		document.getElementById('vps').className='slab-pricing ws-hide';
		document.getElementById('email').className='slab-pricing ws-hide';
		document.getElementById('ssl').className='slab-pricing ws-show';
		document.getElementById('ssl1').className='ws-show';
		document.getElementById('slab-ssl1').className='ws-dnp-over';
	}
}

function subtab(x, y)
{
	for(var i=1;i<4;i++)
	{
		//alert(i);
		document.getElementById('slab-dm'+i).className='ws-dnp-out';
		document.getElementById('slab-ht'+i).className='ws-dnp-out';
		document.getElementById('slab-sv'+i).className='ws-dnp-out';
		document.getElementById('slab-vps'+i).className='ws-dnp-out';
		document.getElementById('slab-em'+i).className='ws-dnp-out';
		document.getElementById('slab-ssl'+i).className='ws-dnp-out';
		document.getElementById('dm'+i).className='ws-hide';
		document.getElementById('ht'+i).className='ws-hide';
		document.getElementById('sv'+i).className='ws-hide';
		document.getElementById('vps'+i).className='ws-hide';
		document.getElementById('em'+i).className='ws-hide';
		document.getElementById('ssl'+i).className='ws-hide';
	}
	//alert(x);
	document.getElementById('slab-'+x+y).className='ws-dnp-over';
	document.getElementById(x+y).className='ws-show';
}

function indexpopup(x)
{
	for(var i=1;i<4;i++)
	{
		document.getElementById('tab'+i).className='box-none';
	}
	document.getElementById(x).className='box-block';
}

function stm(hi, ti)
{
	if(document.getElementById('c'+hi).checked)
		document.getElementById('q'+ti).disabled=false;
	if(!document.getElementById('c'+hi).checked)
	{
		document.getElementById('q'+ti).disabled=true;
		document.getElementById('q'+ti).value='0';
	}
}

var timeout         = 0;
var closetimer		= 0;
var ddmenuitem      = 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}


function open_popup(theURL,winName,myWidth, myHeight, isCenter) 
    { 
    
        features = 'marginleft=0,marginright=0,toolbar=no,status=no,menubar=no,location=no,scrollbars=yes,resizable=yes';
        if(window.screen)if(isCenter)if(isCenter=="true")
        {
            var myLeft = (screen.width-myWidth)/2;
            var myTop = (screen.height-myHeight)/2;
            features+=(features!='')?',':'';
            features+=',left='+myLeft+',top='+myTop;
        }

        window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
    }

// close layer when click-out
document.onclick = mclose;

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=0,width=725,height=450,left = 370,top = 225');");
}