if (document.images) {
	var logo_over = new Image();
	logo_over.src = "/images/siteCredits_over.gif";
	var logo_off = new Image();
	logo_off.src = "/images/siteCredits_off.gif";
}

function over(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "_over.src");
	}
}
function off(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "_off.src");
	} 
}

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 openRegularPage(targetUrl, windowName){
	    


	var newWindow = window.open(targetUrl, windowName, '');


}

function downloadFile(baseFileId)
{	
	//document.getElementById('downloadBaseFileId').value = baseFileId;
	//javascript:document.forms[0].submit();
	
	openRegularPage('download.aspx?fileName=' + baseFileId, 'DownloadFile');
}


previousHash = '';
hashInterval = '';


function flashPutHref(newHash) { 
	location.hash = newHash;
	relocateWindow(newHash);
	
	
}


function relocateWindow(newHash) {

	
	if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length){
		
	}else {
		frames['testiframe'].location.href = "history.aspx?" + newHash;
	}

	
}

function flashPutTitle(newTitle) { 

	if (newTitle != "null") {
		document.title = newTitle; 
	}else {
		document.title = "Balenciaga"; 
	}

}

