// Copyright 2006-2007 javascript-array.com

var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;
var exit=true;
// 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;
	}
}

// close layer when click-out
document.onclick = mclose; 


function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=500,height=570,screenX=150,screenY=150,top=150,left=150')
}


function exitwindow()
{
var url = 'http://www.example.com';
var win = 'toolbar=0,directories=0,menubar=0,scrollbars=0,resizable=0,width=250,height=300';
if (exit)
open(url,'WindowName',win); 
}

var PreventExitPop = false;
function ExitPop() {
if(exit)
{
if(PreventExitPop == false) {
PreventExitPop=true;
window.scrollTo(0, 0);
var googlewin=dhtmlwindow.open("ynobuy", "iframe", "feedback.html", "WAIT! Help us Serve you better", "width=400px,height=275px,resize=1,scrolling=1,center=1", "recal");
googlewin.moveTo(30,100);
googlewin.onclose=function(){
	
return window.confirm("Tell Us Why You Did not Buy This Time");};
/* Below the text on alert window can be changed... \n for "Carriage Return"... no quotations allowed! */
return "*****************************************************\n\nHelp us serve you better. We are sad that you did not buy from us, But help us understand why.\n\nPlease Click the Cancel Button and fill the form to help us understand why you did not buy this time..\n\n*****************************************************"
} }}

// end -->
