var sw;
sw = screen.width;

if (sw <= 640)
{
document.write("<link rel=stylesheet href=styles/tbvstyles640.css type=text/css>");
}
else if (sw > 640 && sw <= 800)
{
document.write("<link rel=stylesheet href=styles/tbvstyles800.css type=text/css>");
}
else if (sw > 800 && sw <= 1030)
{
document.write("<link rel=stylesheet href=styles/tbvstyles1024.css type=text/css>");
}
else if (sw > 1030)
{
document.write("<link rel=stylesheet href=styles/tbvstyles1280.css type=text/css>");
}

function logo()
{
if (screen.width <= 640)
	{
	document.write("<img src=\"images/logo640.jpg\" alt=\"The Breakable Vow - The Novel, Curriculum Guide, Video & Audio Training Series\" width=\"600\" height=\"161\" border=\"0\" align=\"middle\">");
	}
	else if (screen.width <= 800)
	{
	document.write("<img src=\"images/logo800.jpg\" alt=\"The Breakable Vow - The Novel, Curriculum Guide, Video & Audio Training Series\" width=\"755\" height=\"202\" border=\"0\" align=\"middle\">");
	}
	else if (screen.width > 800)
	{
	document.write("<img src=\"images/logo.jpg\" alt=\"The Breakable Vow - The Novel, Curriculum Guide, Video & Audio Training Series\" width=\"799\" height=\"214\" border=\"0\" align=\"middle\">");
	}
}

var msg = "Check out our Video & Audio Training Series                                                                                    ";

function scrollStat()  // display scrolling text in status bar
  {
  status = msg;
  msg = msg.substring(1, msg.length) // extracts one character
  + msg.substring(0, 1);// adds remaining characters
  status = msg;
  setTimeout("scrollStat()",200);
  }

function menu()
{
		document.write("<P><A href=\"index.htm\" onmouseover=\"status='The Breakable Vow - Home Page'; return true;\" onmouseout=\"status=''; return true;\"><B>Home</B></A><P><A href=\"tbv.htm\" onmouseover=\"status='The Breakable Vow - The Novel'; return true;\" onmouseout=\"status=''; return true;\"><B>The Breakable Vow</B></A><P><A href=\"cgvats.htm\" onmouseover=\"status='The Breakable Vow - Curriculum Guide'; return true;\" onmouseout=\"status=''; return true;\"><B>Curriculum Guide</B></A><P><A href=\"dve.htm\" onmouseover=\"status='The Breakable Vow - Dating and Domestic Violence Explained'; return true;\" onmouseout=\"status=''; return true;\"><B>Dating and Domestic Violence Explained</B></A><P><A href=\"dve.htm\" onmouseover=\"status='The Breakable Vow - Teens Click here'; return true;\" onmouseout=\"status=''; return true;\"><B>Teens Click Here</B></A><P></TD>");
}

function preloadAboutmeImages()
{
	if (sw <= 640)
	{
		var logo640 = new Image();
		logo640.src = "images/kathysfoxpicturereduced.jpg";	
	}
	else if (sw > 640 && sw <= 800)
	{
		var logo = new Image();
		logo.src = "images/kathysfoxpicturereduced.jpg";
	}
	else if (sw > 800 && sw <= 1030)
	{
		var logo1024 = new Image();
		logo1024.src = "images/logo.jpg";
		
		var kcimage1024 = new Image();
		kcimage1024.src = "images/kathysfoxpicturereduced.jpg";		
	}
	else if (sw > 1030)
	{
		var logo1280 = new Image();
		logo1280.src = "images/kathysfoxpicturereduced.jpg";
	}
}

function hoverOver(x)
{
	if (! document.all)
	{	
		document.getElementById(x).style.backgroundColor='yellow';
		document.getElementById(x).style.color='#336633';	
	}
	else
	{	
		x.style.backgroundColor='yellow';
		x.style.color='#336633';
	}	
}

function hoverOut(x)
{
	if (! document.all)
	{	
		document.getElementById(x).style.backgroundColor='#336633';
		document.getElementById(x).style.color='lightcyan';
	}
	else
	{	
		x.style.backgroundColor='#336633';
		x.style.color='lightcyan';
	}
}

function hoverClick(x)
{
	if (! document.all)
	{
		document.getElementById(x).style.backgroundColor='yellow';
		document.getElementById(x).style.color='red';	
	}
	else
	{			
		x.style.backgroundColor='yellow';
		x.style.color='red';
	}
}

function hoverStatus(x)
{
	status = x + " Impulse Power Limited" 
}

function hoverOverCal(x)
{
	if (! document.all)
	{
		document.getElementById(x).style.color='red';	
	}
	else
	{
		x.style.color='red';
	} 
}

function hoverOutCal(x)
{
	if (! document.all)
	{
		document.getElementById(x).style.color='blue';	
	}
	else
	{
		x.style.color='blue';
	} 
}

function opennewwin(x)
{
SubWindow=window.open(x,'SubWindow',"left=50,top=25,width=570px,height=435px,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,copyhistory=no,directories=no");
} 

function openusefulwin(x)
{
window.open(x,'',"left=70,top=45,width=520px,height=320px,status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes,copyhistory=yes,directories=yes");
}

function singleSpace640()
{
	if (screen.width >= 640)
	 {   
	     document.write("<br />");
	 }
}

function singleSpace800()
{
	if (screen.width > 800)
	 {   
	     document.write("<br />");
	 }
}
function singleSpace1024()
{
	if (screen.width > 1024)
	 {   
	     document.write("<br />");
	 }
}