// xp_progressbar
// Copyright 2004 Brian Gosselin of ScriptAsylum.com
//
// v1.0 - Initial release
// v1.1 - Added ability to pause the scrolling action (requires you to assign
//        the bar to a unique arbitrary variable).
//      - Added ability to specify an action to perform after a x amount of
//      - bar scrolls. This requires two added arguments.
// v1.2 - Added ability to hide/show each bar (requires you to assign the bar
//        to a unique arbitrary variable).

// var xyz = createBar(
// total_width,
// total_height,
// background_color,
// border_width,
// border_color,
// block_color,
// scroll_speed,
// block_count,
// scroll_count,
// action_to_perform_after_scrolled_n_times
// )

var w3c=(document.getElementById)?true:false;
var ie=(document.all)?true:false;
var N=-1;

//vars for JVM Check
var Browser = navigator.appName;
	var Version = navigator.appVersion;
	

function createBar(w,h,bgc,brdW,brdC,blkC,speed,blocks,count,action){
if(ie||w3c){
var t='<div id="_xpbar'+(++N)+'" style="visibility:visible; position:relative; overflow:hidden; width:'+w+'px; height:'+h+'px; background-color:'+bgc+'; border-color:'+brdC+'; border-width:'+brdW+'px; border-style:solid; font-size:1px;">';
t+='<span id="blocks'+N+'" style="left:-'+(h*2+1)+'px; position:absolute; font-size:1px">';
for(i=0;i<blocks;i++){
t+='<span style="background-color:'+blkC+'; left:-'+((h*i)+i)+'px; font-size:1px; position:absolute; width:'+h+'px; height:'+h+'px; '
t+=(ie)?'filter:alpha(opacity='+(100-i*(100/blocks))+')':'-Moz-opacity:'+((100-i*(100/blocks))/100);
t+='"></span>';
}
t+='</span></div>';
document.write(t);
var bA=(ie)?document.all['blocks'+N]:document.getElementById('blocks'+N);
bA.bar=(ie)?document.all['_xpbar'+N]:document.getElementById('_xpbar'+N);
bA.blocks=blocks;
bA.N=N;
bA.w=w;
bA.h=h;
bA.speed=speed;
bA.ctr=0;
bA.count=count;
bA.action=action;
bA.togglePause=togglePause;
bA.showBar=function(){
this.bar.style.visibility="visible";
}
bA.hideBar=function(){
this.bar.style.visibility="hidden";
}
bA.tid=setInterval('startBar('+N+')',speed);
return bA;
}}

function startBar(bn){
var t=(ie)?document.all['blocks'+bn]:document.getElementById('blocks'+bn);
if(parseInt(t.style.left)+t.h+1-(t.blocks*t.h+t.blocks)>t.w){
t.style.left=-(t.h*2+1)+'px';
t.ctr++;
if(t.ctr>=t.count){
eval(t.action);
t.ctr=0;
}}else t.style.left=(parseInt(t.style.left)+t.h+1)+'px';
}

function togglePause(){
if(this.tid==0){
this.tid=setInterval('startBar('+this.N+')',this.speed);
}else{
clearInterval(this.tid);
this.tid=0;
}}

function togglePause(){
if(this.tid==0){
this.tid=setInterval('startBar('+this.N+')',this.speed);
}else{
clearInterval(this.tid);
this.tid=0;
}
}

function browserchecker(){

	//alert(Browser + "\n\nVersion " + Version);
	
	if ( "Microsoft Internet Explorer" == navigator.appName )
	{	//Running in Internet Explorer.

		if ( (sMSvmVersion = oClientCaps.getComponentVersion("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}", "ComponentID") ) )
		{	//Microsoft VM is present.
		alert(Browser + "\n\nVersion " + Version  + "\n\nJVMachine Version: " +  sMSvmVersion );
		if ( "5,0,3802,0" || "5,0,3805,0"  == sMSvmVersion || "5,0,3806,0"  == sMSvmVersion || "5,0,3807,0"  == sMSvmVersion || "5,0,3808,0"  == sMSvmVersion|| "5,0,3809,0"  == sMSvmVersion || "5,0,3810,0" == sMSvmVersion )
			{	//The current version of Microsoft VM is installed; no action is needed.
				
document.writeln("<div align=\"center\">");
document.writeln("  <center>");
document.writeln("  <table border=\"1\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#FF0000\" width=\"67%\" id=\"AutoNumber1\" height=\"67\">");
document.writeln("    <tr>");
document.writeln("      <th width=\"100%\" bgcolor=\"#0099CC\" bordercolor=\"#FF0000\" height=\"19\">");
document.writeln("      <font color=\"#FFFFFF\">Your Web");
document.writeln("      Browser </font><font color=\"#FF0000\">IS</font><font color=\"#FFFFFF\">");
document.writeln("      Configured to Use Java</font></th>");
document.writeln("    </tr>");
document.writeln("    <tr>");
document.writeln("      <td width=\"100%\" height=\"47\">");
document.writeln("      <blockquote>");
document.writeln("        <div align=\"center\">");
document.writeln("          <center>");
document.writeln("          <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#FF0000\" width=\"50%\" id=\"AutoNumber2\">");
document.writeln("            <tr>");
document.writeln("              <td width=\"100%\">");
document.writeln("              <p align=\"center\"><font color=\"#000080\">Welcome to The Ananta Yoga");
document.writeln("              Web</font></td>");
document.writeln("            </tr>");
document.writeln("          </table>");
document.writeln("");
document.writeln("	<br>");
document.writeln("");
document.writeln("          <table border=\"1\" cellpadding=\"6\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#FF0000\" width=\"81%\" id=\"AutoNumber2\" bgcolor=\"#CCFFFF\">");
document.writeln("            <tr>");
document.writeln("              <td width=\"100%\">");
document.writeln("");
document.writeln("        <p align=\"justify\"><font color=\"#000080\">The Ananta Yoga Web Site was");
document.writeln("        written using Java Technology Your Browser is Configured&nbsp;");
document.writeln("        to Use The Microsoft Java Virtual Machine. ");
document.writeln("        ");
document.writeln("              </td>");
document.writeln("            </tr>");
document.writeln("          </table>");
document.writeln("          </center>");
document.writeln("          </div>");
document.writeln("");
document.writeln("      </blockquote>");

document.writeln("      <p align=\"center\"><font color=\"#000080\"><b><center>");
document.writeln("      <span style=\"background-color: #FFFF00\">&nbsp; &nbsp;Please Wait While You Are Transferred to The Ananta Yoga Website");
document.writeln("      &nbsp;&nbsp; </span>&nbsp;</b></font><font color=\"#FF0000\"></font><b><font color=\"#000080\">");

//Flashbar take us to the Ananta Yoga Web http://www.upnaway.com/~bindu/anantayogaweb/
//var bar2=createBar(480,10,'black',1,'navy','cyan',20,12,5, 'parent.document.location="http://www.upnaway.com/~bindu/index2005.html"');

var bar2=createBar(480,10,'black',1,'navy','cyan',20,12,5, 'parent.document.location="http://www.upnaway.com/~bindu/anantayogaweb/"');

document.writeln("</center>");

document.writeln("    </tr>");
document.writeln("  </table>");
document.writeln("");
document.writeln("</div>");
document.writeln("</center>");
				
				//Insert Redirect to the working page here
				//window.setTimeout( "redirector('tabledat.htm')", 10000 );

} else{	//An older version of Microsoft VM is installed. Redirect for update.
			//alert(sMSvmVersion);
				//document.write("The most recent version of Microsoft VM is not installed on this computer.<BR>");


document.writeln("<div align=\"center\">");
document.writeln("  <center>");
document.writeln("  <table border=\"1\" cellpadding=\"4\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#FF0000\" width=\"67%\" id=\"AutoNumber1\" height=\"67\">");
document.writeln("    <tr>");
document.writeln("      <th width=\"100%\" bgcolor=\"#0099CC\" bordercolor=\"#FF0000\" height=\"19\">");
document.writeln("      <font color=\"#FFFFFF\">Your Web");
document.writeln("      Browser is </font><font color=\"#FF0000\">NOT</font><font color=\"#FFFFFF\">");
document.writeln("       Using The latest Java Virtual Machine</font></th>");
document.writeln("    </tr>");
document.writeln("    <tr>");
document.writeln("      <td width=\"100%\" height=\"47\">");
document.writeln("      <blockquote>");
document.writeln("        <div align=\"center\">");
document.writeln("          <center>");
document.writeln("          <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#FF0000\" width=\"50%\" id=\"AutoNumber2\">");
document.writeln("            <tr>");
document.writeln("              <td width=\"100%\">");
document.writeln("              <p align=\"center\"><font color=\"#000080\">Welcome to The Ananta Yoga");
document.writeln("              Web</font></td>");
document.writeln("            </tr>");
document.writeln("          </table>");
document.writeln("");
document.writeln("	<br>");
document.writeln("");
document.writeln("          <table border=\"1\" cellpadding=\"6\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#FF0000\" width=\"81%\" id=\"AutoNumber2\" bgcolor=\"#CCFFFF\">");
document.writeln("            <tr>");
document.writeln("              <td width=\"100%\">");
document.writeln("");
document.writeln("        <p align=\"justify\"><font color=\"#000080\">The Ananta Yoga Web Site was");
document.writeln("        written using Java Technology But Your Browser is Not Configured&nbsp;");
document.writeln("        to Use The Microsoft Java Virtual Machine. Please Report the  Number");
document.writeln("        Below to The Webmaster So That We Can Make Adjustments to The Website");
document.writeln("        Which Will Make it More Accessible to More People.</font></p>");
document.writeln("              </td>");
document.writeln("            </tr>");
document.writeln("          </table>");
document.writeln("          </center>");
document.writeln("          </div>");
document.writeln("");
document.writeln("      </blockquote>");
document.writeln("      <p align=\"center\"><font color=\"#000080\"><b>");
document.writeln("      <span style=\"background-color: #FFFF00\">&nbsp; Please Click to Email This Number");
document.writeln("      to The Webmaster&nbsp; </span>&nbsp;</b></font><font color=\"#FF0000\">-----&gt;</font><b><font color=\"#000080\">");

//Configure to send Virtual Machine Version Number to email 

//contains two lines in email...
sEmailVersion = sMSvmVersion + '&Body=Your%20Microsoft%20Java%20Virtual%20Machine%20Version\%20Number%20is%20'  + sMSvmVersion+ '%3A%20%0D%0APlease%20Email%20it%20to%20the%20webmaster';

document.writeln("      <font size=\"5\">&nbsp; <a href=\mailto:haus@upnway.com\?Subject=Ananta\%20Yoga\%20Web\%20Java\%20Version\%20Error\%20" + sEmailVersion + ">" + sMSvmVersion + "</a></font><font size=\"5\">");
document.writeln("<center><br>");
document.writeln("      <font size=\"4\"><span style=\"background-color: #FFFF00\">&nbsp; &nbsp;You Will be Transferred to a Solution in a 30 seconds");
document.writeln("      &nbsp;&nbsp; </span>&nbsp;</b></font><font color=\"#FF0000\"></font><b><font color=\"#000080\">");

//Flashbar
var bar2=createBar(480,10,'black',1,'navy','cyan',20,12,30, 'parent.document.location="tabelda1t.htm"');
document.writeln("   <p>   <font size=\"3\"><span style=\"background-color: #0099CC\">&nbsp; &nbsp;<a href=tabelda1t.htm>Open Solution Now</a>");
document.writeln("      &nbsp;&nbsp; </span>&nbsp;</b></font><font color=\"#FF0000\"></font><b><font color=\"#000080\">");


document.writeln("</center>");
document.writeln("      ");
document.writeln("&nbsp;</font></font></b></td>");
document.writeln("    </tr>");
document.writeln("  </table>");
document.writeln("");
document.writeln("</div>");

document.writeln("</center>");


															
				//versionText();
				//window.setTimeout ( "redirector()", 10000 );
			}

   		} else
   		{	//Microsoft VM is not present.

   			document.write("Microsoft VM is not installed on this computer.<BR>");
   			versionText();
   			//window.setTimeout( "redirector('URL')", 10000 );
   		}
   	} else {
   		//Not running in Internet Explorer.
   		document.write("This browswer is " + window.navigator.appName + "<BR>" );
   		document.write("Microsoft VM is not available for this product.");
   	}

}
function redirector(URL)
{
 	window.open (URL);
}

function versionText()
{
	if ( navigator.userAgent.indexOf("Windows NT 5.1") >  -1 )
	{	//Running on Windows XP. Will be redirected to Windows Update version 4.

		document.write("A second browser window will open to <A HREF='http://windowsupdate.microsoft.com'>http://windowsupdate.microsoft.com</A> in 10 seconds.<BR><BR>");
		document.write("<OL>");
		document.write("<LI>Choose 'Scan for Updates'. This will take a few seconds to complete.</LI>");
		document.write("<LI>The latest Microsoft VM is installed by the 'Security Update, August 2, 2001' in the 'Critical Updates' section.</LI>");
		document.write("<LI>Click 'Review and install updates'.</LI>");
		document.write("<LI>Click 'Install Now'.</LI>");
		document.write("<LI>After you review the License Agreement, click 'Accept'.</LI>");
		document.write("</OL>");
		document.write("<BR>Please reference Microsoft Knowledge Base article Q306525 to configure Windows XP to automatically look for product updates.<BR>To review this article, type 'MSKB Q306525' in the Address bar of Internet Explorer.<BR>");
	} else
	{	//Not Running on Windows XP, will be redirected to standard Windows Update

		document.write("A second browser window will open to <A HREF='http://windowsupdate.microsoft.com'>http://windowsupdate.microsoft.com</A> in 10 seconds.<BR><BR>");
		document.write("<OL>");
		document.write("<LI>Please click 'Product Updates' on the left side of the window.</LI>");
		document.write("<LI>If you are prompted to install Microsoft Windows Update Active Setup, click 'Yes'.</LI>");
		document.write("<LI>When this completes, one or more updates will be available.</LI>");
		document.write("<LI>Scroll down and then select 'Security Update, August 2,2001'.</LI>");
		document.write("<LI>Click 'Download' at the top of the page.</LI>");
		document.write("<LI>Click 'Start Download' to review your selection.</LI>");
		document.write("<LI>Click 'Yes' after you review the License Agreement.</LI>");
		document.write("</OL>");
	}
}

