// load external google analytics file

function loadScript(url) {document.write('<script src="', url, '" type="text/javascript"></script>');}
loadScript("http://www.google-analytics.com/urchin.js");


//	FLASHCARDS
	function Flashcards() {
		url="http://media.pearsoncmg.com/bc/bc_martini_eap_5/flashcards/index.html";
		winstring="menubar=no,toolbar=no,location=no,status=no,scrollbars=no,resizable=no,width=670,height=525,screenX=100,screenY=100,left=100,top=100";
		window.open(url,"flashcardswin",winstring);
	}

//for labeling activities

function openTutorial(tUrl) {
window.open(tUrl,'tut_window','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600');
}

function opentutorial(tUrl) {
window.open(tUrl,'tut_window','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600');
}


//for MS activities***************************
function openmsact(fileName) {
var newWindow = window.open("","myAct","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=1,width=800,height=600");
newWindow.document.write(getProps(fileName));
newWindow.document.close();
newWindow.focus();
}  

function getProps(fileName) { 
if (fileName.indexOf("dcr") != -1){
   var  properties = "<html><head><title>Tutorial</title></head><body bgColor='#ffffff' ><center><OBJECT CLASSID='clsid:166B1BCA-3F9C-11CF-8075-444553540000' CODEBASE='http://active.macromedia.com/director/cabs/sw.cab#version=6,0,0,0' width='750' height='550' NAME='"+fileName+"'><PARAM NAME='SRC' VALUE='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><PARAM name='ALIGN' VALUE='CENTER'><embed SRC='"+fileName+"' autoplay='true' width='750' height='550' NAME='"+fileName+"' align='center'></embed></OBJECT></center></body></html>";} 

else if (fileName.indexOf("DCR") != -1){
   var  properties = "<html><head><title>Tutorial</title></head><body bgColor='#ffffff' ><center><OBJECT CLASSID='clsid:166B1BCA-3F9C-11CF-8075-444553540000' CODEBASE='http://active.macromedia.com/director/cabs/sw.cab#version=6,0,0,0' width='750' height='550' NAME='"+fileName+"'><PARAM NAME='SRC' VALUE='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><PARAM name='ALIGN' VALUE='CENTER'><embed SRC='"+fileName+"' autoplay='true' width='750' height='550' NAME='"+fileName+"' align='center'></embed></OBJECT></center></body></html>";} 

else if (fileName.indexOf("swf") != -1){
   var  properties = "<html><head><title>Activity</title></head><body bgColor='#ffffff'><center><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='100%' height='100%' id='movie' align=''><param name='movie' value='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><embed src='"+fileName+"' quality='high' width='100%' height='100%' name='movie' align='' autoplay='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object></center></body></html>";}

else if (fileName.indexOf("SWF") != -1){
   var  properties = "<html><head><title>Activity</title></head><body bgColor='#ffffff' ><center><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='100%' height='100%' id='movie' align=''><param name='movie' value='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><embed src='"+fileName+"' quality='high' width='100%' height='100%' name='movie' align='' autoplay='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object></center></body></html>";}

else if (fileName.indexOf("mov") != -1){
   var  properties = "<html><head><title>Movie</title></head><body bgColor='#ffffff' ><center><OBJECT CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='100%' HEIGHT='100%' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab'><PARAM name='SRC' VALUE='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><PARAM name='CONTROLLER' VALUE='true'><EMBED SRC='"+fileName+"' WIDTH='100%' HEIGHT='100%' AUTOPLAY='true' CONTROLLER='true' PLUGINSPAGE='http://www.apple.com/quicktime/download/'></EMBED></OBJECT></center></body></html>";}

else if (fileName.indexOf("MOV") != -1){
   var  properties = "<html><head><title>Movie</title></head><body bgColor='#ffffff' ><center><OBJECT CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='100%' HEIGHT='100%' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab'><PARAM name='SRC' VALUE='"+fileName+"'><PARAM name='AUTOPLAY' VALUE='true'><PARAM name='CONTROLLER' VALUE='true'><EMBED SRC='"+fileName+"' WIDTH='100%' HEIGHT='100%' AUTOPLAY='true' CONTROLLER='true' PLUGINSPAGE='http://www.apple.com/quicktime/download/'></EMBED></OBJECT></center></body></html>";}

else if (fileName.indexOf("htm") != -1){
   var  properties = "<html><head><body bgColor='#ffffff' ><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

else if (fileName.indexOf("HTM") != -1){
   var  properties = "<html><head><body bgColor='#ffffff' ><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

else if (fileName.indexOf("html") != -1){
   var  properties = "<html><head><body bgColor='#ffffff' ><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

else if (fileName.indexOf("HTML") != -1){
   var  properties = "<html><head><body bgColor='#ffffff' ><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

else {
   var  properties = "<html><head><body bgColor='#ffffff' leftmargin='0' topmargin='0' marginheight='0' marginwidth='0'><script language='JavaScript'>document.location.href='"+fileName+"';</script></body></html>";}

return properties; 
 } 
//***************************  

