<!--
/***********************************************
* Document Text Sizer- Copyright 2003 - Taewook Kang.  All rights reserved.
* Coded by: Taewook Kang (http://www.txkang.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
/*------------------------------------------------------------
	Document Text Sizer- Copyright 2003 - Taewook Kang.  All rights reserved.
	Coded by: Taewook Kang (txkang.REMOVETHIS@hotmail.com)
	Web Site: http://txkang.com
	Script featured on Dynamic Drive (http://www.dynamicdrive.com)
	
	Please retain this copyright notice in the script.
	License is granted to user to reuse this code on 
	their own website if, and only if, 
	this entire copyright notice is included.
--------------------------------------------------------------*/

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','tr');

//Specify spectrum of different font sizes:
var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 2;

function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	
	sz += inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 6 ) sz = 6;
	startSz = sz;
		
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize = szs[ sz ];

	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://www.bravaauthors.com/bookshelf/upcoming/">Upcoming Releases</a>'
menu1[1]='<a href="http://www.bravaauthors.com/bookshelf/previous/">Previous Releases</a>'
menu1[2]='<a href="http://www.bravaauthors.com/bookshelf/list/">Printable List</a>'

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="http://www.bravaauthors.com/news#appearances">Appearances</a>'
menu2[1]='<a href="http://www.bravaauthors.com/news#sales">Sales</a>'
menu2[2]='<a href="http://www.bravaauthors.com/news/newsletters/">Newsletters</a>'

//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="http://www.bravaauthors.com/contest/">Reader Contest</a>'
menu3[1]='<a href="http://www.bravaauthors.com/novella-contest/">Novella Contest</a>'

//Contents for menu 4
var menu4=new Array()
menu4[0]='<a href="http://www.bravaauthors.com/gallery/">Photo Gallery</a>'
menu4[1]='<a href="http://www.bravaauthors.com/extras/at-the-movies/">At The Movies</a>'
menu4[2]='<a href="http://www.bravaauthors.com/extras/link-to-us/">Link to Us!</a>'

//Contents for menu 5
var menu5=new Array()
menu5[0]='<a href="http://www.bravaauthors.com/reader-room/recipes/">Recipes</a>'
menu5[1]='<a href="http://www.bravaauthors.com/forum/">Message Board</a>'
menu5[2]='<a href="http://www.bravaauthors.com/reader-room/foreign-covers/">Foreign Covers</a>'
menu5[3]='<a href="http://www.bravaauthors.com/reader-room/contact-us/">Contact Us</a>'
		
var menuwidth='100px' //default menu width
var menubgcolor='#a9153e'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

if (document.images) {
  var homen = new Image();
  homen.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/homen.gif";
  var homea = new Image();
  homea.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/homea.gif";
  var authorsn = new Image();
  authorsn.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/authorsn.gif";
  var authorsa = new Image();
  authorsa.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/authorsa.gif";
  var bookn = new Image();
  bookn.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/bookn.gif";
  var booka = new Image();
  booka.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/booka.gif";
  var newsn = new Image();
  newsn.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/newsn.gif";
  var newsa = new Image();
  newsa.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/newsa.gif";
  var contestn = new Image();
  contestn.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/contestn.gif";
  var contesta = new Image();
  contesta.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/contesta.gif";
  var blogn = new Image();
  blogn.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/blogn.gif";
  var bloga = new Image();
  bloga.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/bloga.gif"; 
  var extrasn = new Image();
  extrasn.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/extrasn.gif";
  var extrasa = new Image();
  extrasa.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/extrasa.gif";
  var readern = new Image();
  readern.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/readern.gif";
  var readera = new Image();
  readera.src = "http://www.bravaauthors.com/wp-content/themes/brava/images/readera.gif";
}
function act(imgName) {
  if (document.images) 
    document.images[imgName].src = eval(imgName + "a.src");
}
function inact(imgName) {
  if (document.images)
    document.images[imgName].src = eval(imgName + "n.src");
}
// -->