/**
	store utility js
	
	$Id: store_util.js,v 1.10 2009/10/07 09:28:20 sandeepz Exp $
**/

var newWindow;
var width;
var height;
var options;
var name;
var url;

function setPageTitle ( title )
{
	window.document.title = title;
}

function popVerisign () 
{
	var urlstr = "https://seal.verisign.com/splash?form_file=fdf/splash.fdf&dn=WWW.ADOBE.COM&lang=en";
	var optionsstr = "toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1";
	
	openPopUpWindow( urlstr, '540', '450', optionsstr, 'verisignWin' );
}


/* product page info links, shipping policy and download info use this */
function openInfoWindow( urlstr, winName, features) 
{ 
	openPopUpWindow( urlstr, '700', '600' );
}

/* 
	Redefining the generic function from flashapp_util.js
	so we can do the ExternalInterface callback if we're unable
	to open a window.

*/
function openPopUpWindow( urlstr, w, h, optionsstr, namestr ) 
{
	if( !urlstr ) return;
	url = urlstr;
	var optionstest =  "";  // assign empty string for default value
	optionstest = optionsstr;
	width = ( typeof w == "undefined" ) ? "800" : w;
	height = ( typeof h == "undefined" ) ? "600" : h;
	options = ( optionstest == "" ) ? "toolbar=no,location=no,menubar=no,scrollbars=yes,resizeable=yes" : optionsstr;
	name = ( typeof namestr == "undefined" ) ? "AdbeWin" : namestr;
	
	//Bug 105074 commenting the two following lines as it was causing issues in safari 3.x and 4.x & failing to handle failed openpopup (when popup blocker is enabled) -sgeorge
	//newWindow = window.open( "", name , options);
	//newWindow.close();
	
	// this is IE8 > detection, wait 1 sec to open window.
	/*@cc_on
    @if (@_jscript_version > 5.7)
      newWindow = setTimeout( 'window.open( url, name , "width="+width+",height="+height+","+options)', 100);
    @else @*/
      newWindow = window.open( url, name , "width="+width+",height="+height+","+options);
    /*@end
	@*/
	
	if( newWindow )
	{
		// this is IE8 > detection, wait 1 sec to open window.
		/*@cc_on
    	@if (@_jscript_version < 5.8)@*/
		newWindow.focus();
    	/*@end
		@*/
	}
	else
	{
		try
		{
			$('app').handleBlockedPopup( url );
		}
		catch(e){}
	}
}

<!-- Flex store cookie -->
function setStoreCookie ( cookie_name, value )
{
	exp_date = 10*365;
	adobe.Cookie.set(cookie_name,value,exp_date,'/','.adobe.com' );
}
