

function OpenPopup(url, width, height) 
{
	window.open(url, 'newWindow','resizable=1,scrollbars=no,width='+ width + ',height=' + height);
} 

function SendToFriend(customQueryString) 
{
    var currentUrl = window.location.href;
			
	if (customQueryString.length > 0)
	{
		if (currentUrl.indexOf('?') != -1)
		{
			currentUrl += "&" + customQueryString;
		}
		else
		{
			currentUrl += "?" + customQueryString;
		}
	}
	
	OpenPopup("/SendToFriend.aspx?url="+escape(currentUrl), '700', '520');			
}

function BookmarkPage(customQueryString, pageName)
{
	var currentUrl = window.location.href;
			
	if (customQueryString.length > 0)
	{
		if (currentUrl.indexOf('?') != -1)
		{
			currentUrl += "&" + customQueryString;
		}
		else
		{
			currentUrl += "?" + customQueryString;
		}
	}
	
	if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4) && navigator.platform == 'Win32')
	{
		window.external.AddFavorite(currentUrl, pageName);
	} 
	
	else 
	{
		alert("Please click Ctrl+D or 'Apple'+D (Safari) to add this page to your bookmarks.");
	}

}

function flashPutHref(newHash) { 

	location.hash = newHash; 


	
	flashPutTitle('MOVADO');
}
function flashPutTitle(newTitle) { document.title = newTitle; }


function getWinSize()
{
    var myWidth = 0, myHeight = 0;
    if( typeof( window.innerWidth ) == 'number' )
    {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    }
    else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
    {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    }
    else if(document.body && (document.body.clientWidth || document.body.clientHeight))
    {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    return {w:myWidth,h:myHeight}
    
}

function adjustFlashSize(Id, maxH)
{
    var winSizes = getWinSize();
    
    
    var flashObj = document.getElementById(Id);
	

	
    if(winSizes.w < 975)
    {
        flashObj.style.width = "975px";
		fo.addParam("width","975px");
    }
    else
    {
	    flashObj.style.width = "100%";
		fo.addParam("width","100%");
    }
    if(winSizes.h < maxH)
    {
		flashObj.style.height = maxH + "px";
		fo.addParam("width", maxH + "px");
    }
    else
    {
		flashObj.style.height = "100%";
		fo.addParam("width","100%");
    }

}	
