function invokeCodeSaw(formName){    eval('document.'+formName+'.action="http://www.codesaw.com/examples/servlet/OpenCodeSaw"');    eval('document.'+formName+'.submit()');}function currentUrl (){    return escape(document.location);}function check_mime(formName){    var ns=document.layers?1:0;    var ie=document.all?1:0;    if(ns)         mime_reg(formName);    else if (ie)         detect_plugin(formName);    else     {          // if windows then confirm          var ch = confirm("I could not detect codesaw on your machine. Shall I contiue to run codesaw ?");          if (ch)           {              invokeCodeSaw(formName);          } else {              document.location.href="http://www.codesaw.com/installCS.php?&csInstalled=1&iitInstall="+currentUrl();          }    }}function mime_reg(formName){    for(var m=0;m<navigator.mimeTypes.length;m++)    {	if(navigator.mimeTypes[m].type=="application/x-codesaw")		{		mime_avail=true;		break;	} else {		mime_avail=false;		continue;	}		    }    if(mime_avail)    {        invokeCodeSaw(formName);    } else {        var ch = confirm("I could not detect codesaw on your machine. Shall I contiue to run codesaw ?");        if (ch)         {            invokeCodeSaw(formName);        }         else {            document.location.href="http://www.codesaw.com/installCS.php?&csInstalled=1&iitInstall="+currentUrl();        }				    }}		 
