
function writeWelcome(){

	/*
	$(function(){
		$.growlUIIcon('Welcome to DocTranslator',
		'<ul>'+
		'<li>Translates to and from over 50 different languages</li>'+
		'<li>It\'s fast. Your large documents are not sent over any networks killing your bandwidth</li>'+
		'<li>It\'s secure, we do not keep any info about your documents. In fact, we don\'t even have a server</li>'+
		'<li>Best of all, IT\'S FREE!</li>'+
		'</ul>'+
		'<img src="images/MS-Word-2-icon-64.png" alt="word" title="I Translate Word Documents!"/>'+
		'<img src="images/Excel-icon-64.png" alt="excel" title="I Translate Excel documents!"/>'+
		'<img src="images/Document-icon-64.png" alt="text" title="I Translate Plain Text documents!"/>', 
		'images/Doc_translate.png',
		'closeWelcomeMessage()'); 
		
	}); 
	
		*/
		
		closeMessage();
	$(function(){
		$.growlUI4Icons('Welcome to DocTranslator',
		'<ul>'+
		'<li>Translates to and from over 50 different languages</li>'+
		'<li>It\'s fast. Your large documents are not sent over any networks killing your bandwidth</li>'+
		'<li>It\'s secure, we do not keep any info about your documents. In fact, we don\'t even have a server</li>'+
		'<li>Best of all, IT\'S FREE!</li>'+
		'</ul>'+
		'<strong>NOTE:</strong>'+
			'Need Java 1.5 (or later version) Plug-in to run this applet, so if it does not work,'+
			'<a href="http://www.java.com/en/download/" target="_blank">'+
			'	get the latest Java Plug-in here.'+
			'</a>'
		, 		
		'closeWelcomeMessage()',
		'images/MS-Word-2-icon-128.png',
		'images/Excel-icon-128.png',
		'images/PowerPoint-icon-128.png',
		'images/Document-icon-128.png'); 
		
	}); 
}


function writeErrorMessage(header){
	writeErrorMessage(header, '');
}


function trackErrorMessage(errorName, body, stackTrace){
	
	trackEvent(GA_CATEGORY_ERROR, GA_EVENT_ERROR_CONTENT, stackTrace);
	

	
}
function writeErrorMessage(header, body){
	
	//closeMessage();
	
	


	$(function(){
		//$.growlUIIcon(header,body, 'images/error.png', 'closeMessage();'); 
		$.growlUIError(header,body);
		
	}); 	
}


function writeNotWindowsMessage(msg){
	
closeMessage();	
	$(function(){
		$.growlUIIcon('!', msg, 'images/Windows.png'); 
		
	}); 
	
}

function writeWaitMessage(header, body){

closeMessage();
	$(function(){
		$.growlUIIconFixed( header, body, 'images/clock.png'); 
		
	}); 


}

function writeJavaVersionMessage(){

closeMessage();

	$(function(){
		$.growlUIIconFixed( 'Java 1.5 or higher is required', 		
					'This browser does not have the proper Java Plug-in version installed.' +					
					'You need Java 1.5 (or later version) to use this service, if it does not work, '+   
					'<div class="java-note">'+ 					
					'<a href="http://www.java.com/en/download/" target="_blank">'+
						'Get the latest Java Plug-in here'+
					'</a></div>'
		, 'images/java_icon.png'); 
		
	}); 


}


function closeWelcomeMessage(){

	closeMessage();
	
	obj = getElemById('pageWaitingTrust');
	obj.style.visibility = '';
	
			
	appendApplet();
	 
	 writeWaitMessage('Please wait while your browser downloads the translation applet.', 
				'On slow connections this may take a moment<br/ ><br/ ><br/ ><br/ >'+
				'<i>You will also need to trust the applet to allow it to read the documents you would like to translate....</i>');
				
}





function writeWaitingAppletMessage(){

	closeMessage();
	
	obj = getElemById('pageWaitingTrust');
	obj.style.visibility = '';
	

	 
	 writeWaitMessage('Please wait while your browser downloads the translation applet.', 
				'On slow connections this may take a moment<br/ ><br/ >'+
				'<i style="font-size: 14px;">Click "OK" or "Run" to allow DocTranslator to run</i><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/accept_applet_2.png" alt="Trust Applet"  />'
				);
				
}



function writeOpenTranslationMessage(fileName){

	closeMessage();
	
	
	$(function(){
		$.growlUIIconSmall(fileName,'', 'images/Document-Preview-icon_mid.png', 
		"closeMessage(); startFileWithDefaultProgram();"); 
		
	}); 

}




function closeMessage(){

	$(function(){
		$.unblockUI(); 
		
	}); 	
}



