// keep the next line as it is. need it to benefit from InterDev colors, but must comment it out.
// <SCRIPT LANGUAGE="JScript">
<!-- Hide from old browsers
var stay_here=false;

//=========================== popup ========
function promo_out( )
   {

try {
	   	if (stay_here==true) {return}
	   	if (document.cookie.indexOf('promoout=1')>=0) {return}  
   	//if (navigator.appName=='Netscape') {return}
   	if (navigator.appName=='Netscape') {popup.window.close();}
   	
   	var url_param_out;
   	var url_out;
   	var dt = new Date 
	document.cookie='promoout=1; path=/; ' 

	if (window.location.href.indexOf('flower.com')>=0 || window.location.href.indexOf('flower.loc')>=0 )
	{	url_out = '/today/ask.asp';	 }
	else
	{	url_out = '/today/ask.asp';  }

		// homepage? 
		if ( document.cookie.indexOf('store%5FID=1')>=0 && window.location.href.indexOf('justflowers.com')>=0 )
		{
			url_out = '/today/ask.asp';
		}
		else if ( document.cookie.indexOf('store%5FID=2500')>=0  || document.cookie.indexOf('store%5FID=2552')>=0 )
		{
			url_out = '/today/ask.asp';
		}	
		else if (window.location.href.indexOf('flower.com')>=0 || window.location.href.indexOf('flower.loc')>=0 )
		{
			url_out = '/today/ask.asp';
		}
		else if (window.location.href.indexOf('virtualflowers.com')>=0 || window.location.href.indexOf('virtualflowers.loc')>=0 )
		{
			url_out = '/today/vf_leave_summer_750.asp';
			window.open(url_out, "today_out", 'scrollbars=no,menu=no,left=200,top=100,resizeable=no,status=no,width=460,height=285');
		} 
		//else if
		// was homepage?


		// version?
    	if (window.location.href.indexOf("/affiliates")>0)
    	{
    		url_param_out = '?' + window.location.href.replace(/\/affiliates\b/i,"/comeback");
    	}
    		else
			{
				url_param_out = '?' + window.location.href;
			}
			// was version

			url_out = url_out + url_param_out;

    	if ((window.location.href.match(/\/google_sponsored\b/i)==null)
    		&& (window.location.href.match(/\/google_sponsored_cities_states\b/i)==null)
    		&& (window.location.href.match(/\/kmarketplace_pop\b/i)==null)
    		&& (window.location.href.match(/\/kmarketplace_pop_cat\b/i)==null)
    		&& (window.location.href.match(/\/kmarketplace_pop_site\b/i)==null)
    		&& (window.location.href.match(/\/google_spelling\b/i)==null)
    		&& (document.cookie.indexOf('store%5FID=3371')==null)
    		&& (document.cookie.indexOf('store%5FID=4112')==null)
    		&& (document.cookie.indexOf('store%5FID=4134')==null)
    		&& (document.cookie.indexOf('store%5FID=4135')==null)
    		&& (document.cookie.indexOf('store%5FID=4167')==null)
    		&& (document.cookie.indexOf('store%5FID=4168')==null)
    	    && (window.location.href.match(/\/google_sponsored_flowers\b/i)==null))
		{
			window.open(url_out, "today_out", 'scrollbars=no,menu=no,left=200,top=100,resizeable=no,status=no,width=415,height=480');
		
		} //google?
	} 
catch(e) {}
}
//=========================== welcome popup ==========(06/24/2004 now turned off, for turn on uncheck comments)
function promo_in( guid )
{
try {

} catch(e) {}
}

//===========================
function nopromo()
{	
try {
	var par = window.event.srcElement.parentElement.tagName;
	var tag = window.event.srcElement.tagName;
	if (tag=="A" || tag=="AREA" || tag=="INPUT" || tag=="SELECT" || tag=="U" || par=="A")
	   { 
	    stay_here=true; 
		//window.status = window.name+"-"+par+"/"+tag;
	}//if
} catch(e) {}
}

//===========================
function ask_validate( url )
{
	comeback( url )
}
//===========================
function comeback( url )
{
try {

	// -- count Submit clicks
	document.frmAsk.txtEvent.value=100
	
	//--------------------------------------------------
	// -- msgBox for 'Submit & Leave' empty radio button
	var Selected = false;
	for (i = 0; i < document.frmAsk.rdoFeedback.length; i++) {
	if (document.frmAsk.rdoFeedback[i].checked)
	Selected = true;
	}
		
	//--------------------------------------------------
	if ( url.indexOf('/comeback') >= 0 ) { url = url.replace( /GUID=/i, '' )  }

	//'``````````````````````````````````
	var isok = false

	var ret=window.opener;
	try {
		if (window.opener.closed == false )  { isok = true } 
	} 
	catch(e2) {
		isok = false
	}
	
	if (isok == false)  { ret=window.open(url) } 
	else { ret.location.href=url; }
	//'``````````````````````````````````
	ret.focus(); 
	self.close();
	
} catch(e) {}

} //function

//==========================================
function comeback_in( url )
{
try {
	if ( url.indexOf('/comeback') >= 0 ) { url = url.replace( /GUID=/i, '' )  }

	var ret=window.opener;
	
	if (window.opener.closed == true)  { ret=window.open(url) } 
	else { ret.location.href=url; }
		
	ret.focus(); 
	self.close();
	
} catch(e) {}

} 

//=========================== keyword nav_left.asp =========
//-- clear search textbox on focus
function ClearBox(){
	document.frmSearch.kwd.value = ''
} 

//=========================== popup ask.asp, nav_search_homeL_kwd.asp, nav_search_homeO_kwd.asp ========
//-- clear textbox on focus
function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
} 

//=========================== popup ask.asp =========
//-- clear textbox on rdoButton click
function clearTextClick(){
	if (window.document.frmAsk.txtComments.value=='Tell us other Reason:'){
		window.document.frmAsk.txtComments.value='';
		document.frmAsk.txtComments.focus();
	}
}

//=========================== popup ask.asp=========
function checkclose()
{
	// -- count Leave clicks
	document.frmAsk.txtEvent.value=101
	
	// -- msgBox for 'Submit & Leave' empty radio button
	var Selected = false;
	for (i = 0; i < document.frmAsk.rdoFeedback.length; i++) {
	if (document.frmAsk.rdoFeedback[i].checked)
	 Selected = true,self.close();
	}
	
	if (!Selected) {
	alert ("Please make your choice and click Leave!");
	return (false);
	Selected = true,self.close();
	}
	
}

//=========================== popup vf_leave.asp=========
var newwindow;
function poptastic(url)
{
	newwindow=window.open(url,'name','height=600,width=800,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes,menubar=yes,location=yes');
	if (window.focus) {newwindow.focus()}
	self.close()
}

//-->
