/*
	2006.06.29	gricke
				<checkPromotion> 
				SEE ALSO: Xsl_FSEPG/productPage.xslt
				
	2006.05.10	gricke
				<javaScriptMethodName>: Communication with Flash
				SEE ALSO: 
					JavaScriptFlashGateway.js
					fsepgStyle/productPage.css
					
	2005.12.14	gricke
				Created
				Loads the same files that are used 
				**This file called on every page - ControlPanel 
				
				Xsl_CommonRaw/TemplatesCommon.asp <$JavaScriptAll>
*/
function checkPromotion(AdCode){
	if (document.getElementById('getPath')){
		var dispPath = document.getElementById('getPath');
		var pathIs = window.location;
		var delimiter = 'promo';
		
		pathIs = pathIs.toString();
		
		if(pathIs.indexOf(delimiter) > 0){
			pathIs = pathIs.substring(pathIs.indexOf(delimiter)+delimiter.length,pathIs.length-1);
			//dispPath.innerHTML = pathIs + 'code' + AdCode;
			if(pathIs == AdCode){
				document.getElementById('promoImage').style.display = 'inline';
			}			
		}else{
			//dispPath.innerHTML = '';
		}
	}
}
function javaScriptMethodName(imagePop){	
	var popImage = document.getElementById('popImage');
	popImage.style.display = 'block';
	var HTMLDisp = '';
	HTMLDisp = HTMLDisp + '<div id=\"imagePop\">'
	HTMLDisp = HTMLDisp + '<a href=\"#\" onclick=\"imagePopClose();return false;\"><img id=\"closeBut\" src=\"images/closeButton.gif\" width=\"21\" height=\"21\" border=\"0\" alt=\"close\" /></a>'
	HTMLDisp = HTMLDisp + '<img src=\"/flash/images/' + imagePop + '\">' 
	HTMLDisp = HTMLDisp + '</div>'
	popImage.innerHTML = HTMLDisp;
}

function imagePopClose(){
	var popImage = document.getElementById('popImage');
	popImage.style.display = 'none';
}
document.write('<' + 'script');
document.write(' language="javascript"');
document.write(' type="text/javascript"');
document.write(' src="/JavaScriptShell/LiteratureDownload.js">');
document.write('</' + 'script' + '>');

//These overrite what is set in above
xFromRight = 350;
yFromTop = 0;

function HidePdfImage(){
	document['PDFCover'].src = 'images/trans.gif';
	document.getElementById("PDFCoverDiv").style.backgroundColor = 'transparent';
	document.getElementById("PDFCoverDiv").style.padding = '0px';
}
var Features = 'toolbar=no,location=no,directories=no,status=no,menubar=no,' +
   		       'scrollbars=yes,resizable=no,top=100,left=400' 
var NewWinName = 'PopUpWin'

function popwin(NewWinName,Features,winWidth,winHeight){
	Features = Features + ',width=' + winWidth;
	Features = Features + ',height=' + winHeight;
	w = window.open ("",NewWinName,Features)
}
function multiMediaToBigImage(fileDisp){
	if (document.getElementById('multiMedia')){
		var playMultiMedia = document.getElementById('multiMedia');
		var HTMLDisp = '';
		HTMLDisp = HTMLDisp + '<iframe id=\"IframeID\" name=\"Iframe\" src=\"' + fileDisp + '\" width=\"590\" height=\"250\" frameborder=\"0\">s</iframe>';
		HTMLDisp = HTMLDisp + '';
   		playMultiMedia.innerHTML = HTMLDisp;
		document.getElementById('BigImage').style.visibility = 'hidden';
		document.getElementById('multiMedia').style.visibility = 'visible';
	}	
}
function backToGallery(){
	document.getElementById('multiMedia').style.visibility = 'hidden';
	document.getElementById('BigImage').style.visibility = 'visible';
}
function adjustExcelEditor(){
	if (document.getElementById('Edit_ExcelDataEditor')){
		document.getElementById('Edit_ExcelDataEditor').style.top = '-300px';
	}
}