//var backImage = new Array();
//backImage[0] = "11.jpg";
//document.body.background = backImage[whichImage];
var nn4 = (document.layers);
var nn6 = (document.getElementById && !document.all);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
function loadBody()
{
//yesnocancel=confirm('Load body?')
clickButton('Home');
//NewsScrollStart();
}

function loadPage(id,nestref,url) {
if (nn4) {
var lyr = (nestref)? eval('document.'+nestref+'.document.'+id) : document.layers[id]
lyr.load(url,lyr.clip.width)
}
else if(ie4) parent.contentFRM.location = url;
else if(ie5 || nn6) document.getElementById('contentFRM').src = url;
}

function showPage(id) {
if (ie4) {
document.all[id].innerHTML = parent.contentFRM.document.body.innerHTML;
}
else if(nn6 || ie5) { 
document.getElementById(id).innerHTML = window.frames['contentFRM'].document.getElementById('theBody').innerHTML;
   }
}

function clickButton(buttonName,quicklink)
{
//fh = fopen("N://tej//reddot//farzana//webroot//About%20Us.html", 0); // Open the file for reading 
//if(fh!=-1) // If the file has been successfully opened 
//{ 
//    length = flength(fh);         // Get the length of the file     
//    str = fread(fh, length);     // Read in the entire file 
//    fclose(fh);                    // Close the file 
//     
// Display the contents of the file     
//    confirm(str);
//}
//    return true;
switch(buttonName)
{
case 'Home':
	contentSrc = 'Home.html';
	aName = 'homea';
	break;
case 'About Us':
	contentSrc = 'About Us.html';
	aName = 'aboutusa';	
	break;
case 'Partners':
	contentSrc = 'Partners.html';
	aName = 'partnersa';
	break;
case 'Champions':
	contentSrc = 'Champions.html';
	aName = 'championsa';
	break;
case 'Staff':
	contentSrc = 'Staff.html';
	aName = 'staffa';
	break;
case 'Contact Us':
	contentSrc = 'Contact Us.html';
	aName = 'contactusa';
	break;
case 'Dealers':
	contentSrc = 'Dealers.html';
	aName = 'dealersa';
	break;
default:
	contentSrc = '#';
	break;
}
var myFrame=document.getElementById('iframebox');
var activeImage = "url('jpgs/red button.png')";
var inactiveImage = "url('jpgs/black button.png')";

//document.frames['iframebox'].location.href='file:///N:/tej/reddot/farzana/webroot/About Us.html';
if (!quicklink)
document.all.iframebox.src=contentSrc;
else
document.all.iframebox.src=contentSrc+quicklink;
//document.getElementById('contentbox').innerHTML="some NEW html";
//document.all.contentbox.innerHTML="some NEW html";

//confirm(document.getElementById('aboutusa').style.backgroundImage);
document.getElementById('homea').style.backgroundImage=inactiveImage ;
document.getElementById('aboutusa').style.backgroundImage=inactiveImage ;
document.getElementById('partnersa').style.backgroundImage=inactiveImage ;
document.getElementById('championsa').style.backgroundImage=inactiveImage ;
document.getElementById('staffa').style.backgroundImage=inactiveImage ;
document.getElementById('contactusa').style.backgroundImage=inactiveImage ;
document.getElementById('dealersa').style.backgroundImage=inactiveImage ;

document.getElementById(aName).style.backgroundImage=activeImage ;
//confirm(document.getElementById('aboutusa').style.backgroundImage);

//--document.getElementById('contentbox').innerHTML=document.all.iframebox.innerHTML;
//document.frames['iframebox'].reload;
//confirm(document.getElementById('iframediv').innerHTML);
//myFrame.reload();
//document.getElementById('iframediv').style.display='none';
////confirm(myFrame.contentWindow.document.body.innerHTML);
//document.getElementById('contentbox').innerHTML=document.getElementById('iframe').innerHTML;
//confirm(myFrame.contentWindow.document.body.innerHTML);
//document.getElementById('contentbox').innerHTML=myFrame.contentWindow.document.body.innerHTML;
//document.all.contentbox.src='file:///N:/tej/reddot/farzana/webroot/About Us.html'
//document.getElementById('contentbox').innerHTML = '<iframe src="file:///N:/tej/reddot/farzana/webroot/About Us.html" class="style4" style="overflow:scroll; position:absolute;z-index:2;height: 310px; width: 675px; left: 280px; top: 245px;"></iframe>';
return true;

//==   var newImage = "url('file:///N:/tej/reddot/farzana/webroot/jpgs/red button.jpg')";
//==   var contentBoxID = document.getElementById("contentbox");
   //yesnocancel=confirm('Did u mean to click the button?')
//==   document.getElementById('iframebox').innerHTML=document.getElementById('aboutus_content').innerHTML;
//==   document.getElementById('contentbox').innerHTML=document.getElementById('iframe').innerHTML;
//==   document.getElementById('aboutus_button').style.backgroundImage=newImage;
//==   return true;
}
function changeDivImage()
{
        var imgPath = new String();
        imgPath = document.getElementById("div1").style.backgroundImage;
        if(imgPath == "url(images/blue.gif)" || imgPath == "")
        {	document.getElementById("div1").style.backgroundImage = "url(images/green.gif)";}
        else {
        	document.getElementById("div1").style.backgroundImage = "url(images/blue.gif)";
        	}
}
function getContentFromIframe(iFrameName) 
{   
var myIFrame = document.getElementById(iFrameName);     
var content = myIFrame.contentWindow.document.body.innerHTML;    
alert('content: ' + content);   
content = 'The inside of my frame has now changed';  
myIFrame.contentWindow.document.body.innerHTML = content; 
}
//document.body.style.scrollbarFaceColor="colorname"
//document.body.style.scrollbarArrowColor="colorname"
//document.body.style.scrollbarTrackColor="colorname"
//document.body.style.scrollbarShadowColor="colorname"
//document.body.style.scrollbarHighlightColor="colorname"
//document.body.style.scrollbar3dlightColor="colorname"
//document.body.style.scrollbarDarkshadowColor="colorname"
//setInterval("blinkscroll()",1000)

function framechange()
{
confirm("Frame is changing");
var myFrame=document.getElementById('iframebox');
}

function scrollBar(line,face,theme)
	{
		if (!line||!face)
			{
				line=null;
				face=null;
				switch(theme) // Predefined themes
					{
						case "blue":
							var line="#78AAFF";
							var face="#EBF5FF";
							break;
						case "orange":
							var line="#FBBB37";
							var face="#FFF9DF";
							break;
						case "red":
							var line="#FF7979";
							var face="#FFE3DD";
							break;
						case "green":
							var line="#00C600";
							var face="#D1EED0";
							break;
						case "neo":
							var line="#BC7E41";
							var face="#EFE0D1";
							break;
					}
			}

				with(document.body.style)
					{
						scrollbarDarkShadowColor=line;
						scrollbar3dLightColor=line;
						scrollbarArrowColor="black";
						scrollbarBaseColor=face;
						scrollbarFaceColor=face;
						scrollbarHighlightColor=face;
						scrollbarShadowColor=face;
						scrollbarTrackColor="#F3F3F3";
					}
			}

/*------------------[Pointer coordinates catcher]---------------*/
function colorBar(){
		var w = document.body.clientWidth;
		var h = document.body.clientHeight;
		var x = event.clientX;
		var y = event.clientY;
		if(x>w||y-3>h) scrollBar('#000080','#BFDFFF'); // Your colors
		else scrollBar(null,null,"neo"); // A predefined theme
	}

if (document.all){
scrollBar(null,null,"neo");
document.onmousemove=colorBar;
}

function offscreen(){
scrollBar(null,null,"neo");
}

//commented out by tej//document.onmouseout=offscreen;

function subscribe()
{
	/*confirm('Subscriptions featue coming soon!');*/
	return true;
}
<!-- HIDE CODE
 
var scrollspeed		= "1"		// SET SCROLLER SPEED 1 = SLOWEST
var speedjump		= "30"		// ADJUST SCROLL JUMPING = RANGE 20 TO 40
var startdelay 		= "2" 		// START SCROLLING DELAY IN SECONDS
var nextdelay		= "0" 		// SECOND SCROLL DELAY IN SECONDS 0 = QUICKEST
var topspace		= "2px"		// TOP SPACING FIRST TIME SCROLLING
var frameheight		= "80px"	// IF YOU RESIZE THE WINDOW EDIT THIS HEIGHT TO MATCH
 
 
 
current = (scrollspeed)
 
 
function HeightData(){
AreaHeight=dataobj.offsetHeight
if (AreaHeight==0){
setTimeout("HeightData()",( startdelay * 1000 ))
}
else {
ScrollNewsDiv()
}}
 
function NewsScrollStart(){
confirm('NewsScrollStart?');
//dataobj=document.all? document.all.NewsDiv : document.getElementById("NewsDiv")
dataobj=document.all? document.all.NewsDiv : document.getElementById("NewsWindow")
dataobj.style.top=topspace
setTimeout("HeightData()",( startdelay * 1000 ))
}
 
function ScrollNewsDiv(){
dataobj.style.top=parseInt(dataobj.style.top)-(scrollspeed)
if (parseInt(dataobj.style.top)<AreaHeight*(-1)) {
dataobj.style.top=frameheight
setTimeout("ScrollNewsDiv()",( nextdelay * 1000 ))
}
else {
setTimeout("ScrollNewsDiv()",speedjump)
}}

// END HIDE CODE -->

