function preloadImages() {
	if (document.images) { var loadedImages = new Array;
for(arg=0;arg<preloadImages.arguments.length;arg++) {
loadedImages[arg] = new Image();
loadedImages[arg].src = preloadImages.arguments[arg]; } } }

function img_hot (imgName) { if (document.images)
{ document [imgName].src = "images/" + imgName + "on.gif" } }
function img_cool (imgName) { if (document.images)
{ document [imgName].src = "images/" + imgName + ".gif" } }

function img_hot_share (imgName) { if (document.images)
        { document [imgName].src = "/share/nav/" + imgName + "on.gif" } }
function img_cool_share (imgName) { if (document.images)
        { document [imgName].src = "/share/nav/" + imgName + ".gif" } } 

function openPopup(url) {
        var win;
        var winFeatures = 'width=380,height=500,scrollbars=1,resizable=0,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
}

function openPopupWH(url,w,h) {
        var win;
        var winFeatures = 'width=' + w  + ',height=' + h + ',scrollbars=1,resizable=1,status=0,left=1,top=1,toolbar=no';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
} 

function opensmlPopup(url) {
        var win;
        var winFeatures = 'width=370,height=300,scrollbars=0,resizable=0,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
} 

function openmdPopup(url) {
        var win;
        var winFeatures = 'width=370,height=400,scrollbars=0,resizable=0,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
} 

function openvrysmlPopup(url) {
        var win;
        var winFeatures = 'width=370,height=200,scrollbars=0,resizable=0,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
} 

function openimagesoundpop1(url) {
         var win;
         var winFeatures = 'width=600,height=435,scrollbars=0,resizable=0,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<HTML><HEAD></HEAD><body style="background-color:#fff;">');
		 d.write('<table cellpadding="0" cellspacing="0" border="0">');
		 d.write('<tr valign="top"><td align="center">');
		 d.write('<EMBED SRC="' + url + '" WIDTH=300 HEIGHT=26 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=controlpanel CONSOLE=one AUTOSTART=true><br>');
		 d.write('<EMBED SRC="' + url + '" WIDTH=580 HEIGHT=350 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=imagewindow CONSOLE=one AUTOSTART=true><p><div align="center"><a href="javascript:window.close()"><img src="/process/course/images/close_window.gif" width="116" height="16" border="0" alt="Close Window"></a></div>');
		 d.write('</td></tr>');
		 d.write('</table>');
		 d.write('</BODY></HTML>');
		 d.close();
}

function openSPopup(url) {
        var win;
        var winFeatures = 'width=380,height=500,scrollbars=1,resizable=0,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
} 

function closePage() {
  if (window.close)
    window.close()
  else
    alert("Sorry, your browser doesn't support this feature.");
}


function WM_imageSwap(daImage, daSrc){
  var objStr,obj;
    if(document.images){
    if (typeof daImage == 'string') {
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof daImage == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
}

function opensoundpop(url) {
         var win;
         var winFeatures = 'width=290,height=130,scrollbars=1,resizable=1,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<HTML><HEAD></HEAD><body style="background-color:#fff;">');
		 d.write('<table cellpadding="0" cellspacing="0" border="0">');
		 d.write('<tr valign="top"><td align="center">');
		 d.write('<EMBED SRC="' + url + '" WIDTH=200 HEIGHT=26 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=controlpanel CONSOLE=one AUTOSTART=true>');
		 d.write('<a href="/assessments/help.html"><img src="/process/course/images/audio_help_button.gif" width="48" height="26" border="0" alt="Audio Help"></a><br>');
		 d.write('<EMBED SRC="' + url + '" WIDTH=248 HEIGHT=26 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=statusbar CONSOLE=one AUTOSTART=true><p>');
		 d.write('<div align="center"><a href="javascript:window.close()"><img src="/process/course/images/close_window.gif" width="116" height="16" border="0" alt="Close Window"></a></b></div>');
		 d.write('</td></tr>');
		 d.write('</table>');
		 d.write('</BODY></HTML>');
		 d.close();
}

function openvideopop(url) {
         var win;
         var winFeatures = 'width=360,height=320,scrollbars=1,resizable=1,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<HTML><HEAD></HEAD><body style="background-color:#fff;">');
		 d.write('<table cellpadding="0" cellspacing="0" border="0">');
		 d.write('<tr valign="top"><td align="center">');
		 d.write('<EMBED SRC="' + url + '" WIDTH=272 HEIGHT=26 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=controlpanel CONSOLE=one AUTOSTART=true>');
		 d.write('<a href="/assessments/help.html"><img src="/process/course/images/audio_help_button.gif" width="48" height="26" border="0" alt="Audio Help"></a><br>');
		 d.write('<EMBED SRC="' + url + '" WIDTH=320 HEIGHT=240 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=imagewindow CONSOLE=one AUTOSTART=true><br>');
		 d.write('<EMBED SRC="' + url + '" WIDTH=320 HEIGHT=26 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=statusbar CONSOLE=one AUTOSTART=true><p>');
		 d.write('<div align="center"><a href="javascript:window.close()"><img src="/process/course/images/close_window.gif" width="116" height="16" border="0" alt="Close Window"></a></b></div>');
		 d.write('</td></tr>');
		 d.write('</table>');
		 d.write('</BODY></HTML>');
		 d.close();
}

function opensoundpopnimage(url,imgName,Mytext) {
         var win;
         var winFeatures = 'width=380,height=170,scrollbars=1,resizable=1,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<HTML><HEAD><title>' + Mytext + '</title><link rel="stylesheet" href="/share/style/mdk12_px.css" type="text/css"></HEAD><body style="background-color:#fff;">');
		 d.write('<table width="320" cellpadding="6" cellspacing="0" border="0">');
		 d.write('<tr valign="top"><td colspan="2" class="midtext"><b>' + Mytext + '</b></td></tr>');
		 d.write('<tr valign="top"><td><IMG src="/instruction/images/' + imgName + '.jpg" width=67 height=83>');
		 d.write('</td><td>');
		 d.write('<EMBED SRC="' + url + '" WIDTH=200 HEIGHT=26 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=controlpanel CONSOLE=one AUTOSTART=true>');
		 d.write('<a href="/assessments/help.html"><img src="/process/course/images/audio_help_button.gif" width="48" height="26" border="0" alt="Audio Help"></a><br>');
		 d.write('<EMBED SRC="' + url + '" WIDTH=248 HEIGHT=26 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=positionfield CONSOLE=one AUTOSTART=true><br>');
		 d.write('<div align="right"><a href="javascript:window.close()" id="qbluesm"><b>Close this window</b></font></a></b></div>');
		 d.write('</td></tr>');
		 d.write('</table>');
		 d.write('</BODY></HTML>');
		 d.close();
}

// from /process/course/script/main.js

function openStratPopup(url) {
        var win;
        var winFeatures = 'width=350,height=350,scrollbars=1,resizable=0,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
} 

function openSecondPopup(url) {
        var win;
        var winFeatures = 'width=635,height=435,scrollbars=1,resizable=0,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
} 

function openVSCobjPopup(url) {
        var win;
        var winFeatures = 'width=370,height=330,scrollbars=1,resizable=1,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
}

function openhelpPopup(url) {
        var win;
        var winFeatures = 'width=495,height=400,scrollbars=1,resizable=1,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
} 

function openisllcPopup(url) {
        var win;
        var winFeatures = 'width=370,height=400,scrollbars=1,resizable=1,status=0,left=1,top=1';
        var pg = url;
        win = open(pg,"windownew",winFeatures);
        win.focus();
} 
/*add compact_audioplayer.swf to folder where html file lives*/
function opensoundpopnimageflash(url,imgName,Mytext) {
         var win;
         var winFeatures = 'width=400,height=170,scrollbars=1,resizable=1,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
		 d.write('<title>' + Mytext + '</title></head><body style="background-color:#fff;" onLoad="window.focus()">');
		 d.write('<table width="360" cellpadding="2" cellspacing="0" border="0">');
		 d.write('<tr valign="top"><td colspan="2"><span style="font-size:12px; font-weight:bold; font-family:Arial; color:#000;">' + Mytext + '</span></td></tr>');
		 d.write('<tr valign="top"><td><IMG src="/instruction/images/' + imgName + '.jpg" width=67 height=83>');
		 d.write('</td><td>');
		 d.write('<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="276" height="26" id="compact_audioplayer" align="middle">');
		 d.write('<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" />');
		 d.write('<param name="FlashVars" value="filename=' + url + '" /><param name="base" value="/multimedia/" />');
		 d.write('<param name="movie" value="/multimedia/compact_audioplayer_2009b.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
		 d.write('<embed base="/multimedia/" src="/multimedia/compact_audioplayer_2009b.swf" quality="high" bgcolor="#ffffff" width="276" height="26" name="compact_audioplayer"');
		 d.write('align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"');
		 d.write('FlashVars="filename=' + url + '" />');
		 d.write('</object>');
		d.write('<br /><a href="/assessments/help.html"><img src="/process/course/images/audio_help_button.gif" width="48" height="26" border="0" alt="Audio Help"></a>');
		 d.write('<a href="javascript:window.close()"><img src="/instruction/images/newhelp_button.gif" width="108" height="11" border="0" alt="Close this window" align="right"></a>');
		 d.write('</td></tr></table>');
		 d.write('</body></html>');
		 d.close();
}
function opensoundpopnimagecolleen(url,imgName,Mytext) {
         var win;
         var winFeatures = 'width=400,height=170,scrollbars=1,resizable=1,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
		 d.write('<title>' + Mytext + '</title></head><body style="background-color:#fff;">');
		 d.write('<table width="320" cellpadding="6" cellspacing="0" border="0">');
		 d.write('<tr valign="top"><td colspan="2"><span style="font-size:12px; font-weight:bold; font-family:Arial; color:#000;">' + Mytext + '</span></td></tr>');
		 d.write('<tr valign="top"><td><IMG src="/instruction/images/' + imgName + '.jpg" width=60 height=65>');
		 d.write('</td><td>');
		 d.write('<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="272" height="22" id="compact_audioplayer" align="middle">');
		 d.write('<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" />');
		 d.write('<param name="FlashVars" value="filename=' + url + '" />');
		 d.write('<param name="movie" value="/multimedia/compact_audioplayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
		 d.write('<embed src="/multimedia/compact_audioplayer.swf" quality="high" bgcolor="#ffffff" width="272" height="22" name="compact_audioplayer"');
		 d.write('align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"');
		 d.write('FlashVars="filename=' + url + '" />');
		 d.write('</object>');
		d.write('<br /><a href="/assessments/help.html"><img src="/process/course/images/audio_help_button.gif" width="48" height="26" border="0" alt="Audio Help"></a>');
		 d.write('<a href="javascript:window.close()"><img src="/instruction/images/newhelp_button.gif" width="108" height="11" border="0" alt="Close this window" align="right"></a>');
		 d.write('</td></tr></table>');
		 d.write('</body></html>');
		 d.close();
}

function opensoundpopnimagegeneric(url,imgName,Mytext) {
         var win;
         var winFeatures = 'width=400,height=170,scrollbars=1,resizable=1,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
		 d.write('<title>' + Mytext + '</title></head><body style="background-color:#fff;">');
		 d.write('<table width="320" cellpadding="6" cellspacing="0" border="0">');
		 d.write('<tr valign="top"><td colspan="2"><span style="font-size:12px; font-weight:bold; font-family:Arial; color:#000;">' + Mytext + '</span></td></tr>');
		 d.write('<tr valign="top"><td><IMG src="/process/course/images/' + imgName + '.jpg" width=60 height=65>');
		 d.write('</td><td>');
		 d.write('<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="260" height="26" id="compact_audioplayer_2011" align="middle">');
		 d.write('<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" />');
		 d.write('<param name="FlashVars" value="filename=' + url + '" />');
		 d.write('<param name="movie" value="/multimedia/compact_audioplayer_2011.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
		 d.write('<embed src="/multimedia/compact_audioplayer_2011.swf" quality="high" bgcolor="#ffffff" width="260" height="26" name="compact_audioplayer_2011"');
		 d.write('align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"');
		 d.write('FlashVars="filename=' + url + '" />');
		 d.write('</object>');
		d.write('<br /><a href="/assessments/help.html"><img src="/process/course/images/audio_help_button.gif" width="48" height="26" border="0" alt="Audio Help"></a>');
		 d.write('<a href="javascript:window.close()"><img src="/instruction/images/newhelp_button.gif" width="108" height="11" border="0" alt="Close this window" align="right"></a>');
		 d.write('</td></tr></table>');
		 d.write('</body></html>');
		 d.close();
}

function opensoundpopnimagenquestion(url,imgName,Mytext) {
         var win;
         var winFeatures = 'width=360,height=160,scrollbars=1,resizable=1,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<html><head></head><body style="background-color:#fff;">');
		 d.write('<table width="330" cellspacing="0" cellpadding="0" border="0">');
		 d.write('<tr><td bgcolor="#666666" colspan=2>');
		 d.write('<table width="100%" cellspacing="1" cellpadding="0" border="0">');
		 d.write('<tr bgcolor="#ffffff"><td>');
		 d.write('<table cellpadding="0" cellspacing="3" border="0">');
		 d.write('<tr valign="top"><td rowspan="2"><IMG src="/instruction/images/' + imgName + '.jpg" width=67></td>');
		 d.write('<td><font face="Arial" size="2"><b>' + Mytext + '</b></font></td></tr>');
		 d.write('<tr valign="top"><td>');
		 d.write('<EMBED SRC="' + url + '" WIDTH=200 HEIGHT=26 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=controlpanel CONSOLE=one AUTOSTART=true>');
		 d.write('<a href="/assessments/help.html"><img src="/process/course/images/audio_help_button.gif" width="48" height="26" border="0" alt="Audio Help"></a><br>');
		 d.write('<EMBED SRC="' + url + '" WIDTH=248 HEIGHT=26 NOJAVA=true type=audio/x-pn-realaudio-plugin CONTROLS=positionfield CONSOLE=one AUTOSTART=true>');
		 d.write('</td></tr></table>');
		 d.write('&nbsp;<br><a href="javascript:window.close()"><img src="/instruction/images/newhelp_button.gif" width="108" height="11" border="0" alt="Close this window" align="right"></a>');
		 d.write('</td></tr></table>');
		 d.write('</td></tr></table>');
		 d.write('</body></html>');
		 d.close();
}

function newcomingsoon(title,imgName,Mytext) {
         var win;
         var winFeatures = 'width=380,height=170,scrollbars=1,resizable=1,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<HTML><HEAD><title>' + Mytext + '</title><link rel="stylesheet" href="/share/style/mdk12_px.css" type="text/css"></HEAD><body style="background-color:#fff;">');
		 d.write('<table width="320" cellpadding="6" cellspacing="0" border="0">');
		 d.write('<tr valign="top"><td colspan="2" class="midtext"><b>' + Mytext + '</b></td></tr>');
		 d.write('<tr valign="top"><td><IMG src="/instruction/images/' + imgName + '.jpg" width=67 height=83>');
		 d.write('</td><td>');
		 d.write('<span class="headtext2">Coming Soon</span>');
		 d.write('</td></tr>');
		 d.write('</table>');
		 d.write('</body></html>');
		 d.close();
}

function comingsoon() {
         var win;
         var winFeatures = 'width=220,height=130,scrollbars=1,resizable=1,status=0,left=1,top=1';
         win = open("","windownew",winFeatures);
         win.focus();
		 var d = win.document;
		 d.write('<html><head></head><body style="background-color:#fff;">');
		 d.write('<table cellpadding="0" cellspacing="0" border="0">');
		 d.write('<tr valign="top"><td align="center">');
		 d.write('<div align="center"><font face="Arial,Helvetica,sans-serif" size="+2">Coming Soon</font><p>');
		 d.write('<a href="javascript:window.close()"><img src="/process/course/images/close_window.gif" width="116" height="16" border="0" alt="Close Window"></a></b></div>');
		 d.write('</td></tr>');
		 d.write('</table>');
		 d.write('</body></html>');
		 d.close();
}

function openWidePopup(file,window) {
	var win;
	var winFeatures = 'width=640,height=465,scrollbars=yes,resizable=yes,';
	var pg = file;
	win = open(pg,window,winFeatures);
	//win.focus();
}
