/*var jsScale;
function changeDiv(){
    var heightOthers= 110;    // 150
    var panelHeight = 27;    // Nav Height = 27 + border height = 0  => 27
    var comicHeight = 449;
    var widthPanel = 0;    // with 2 pixels of shadow (10 + 10 + 12)
    var widthAd = 280;
    var comicWidth = 673;
    var myWidth = 0;
    var myHeight = 0;

    if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    }
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    }
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {//IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }

   jsScale = Math.max(1.12, Math.min((myHeight-panelHeight-heightOthers)/comicHeight, (Math.max(1024,0.85*myWidth)-widthAd-widthPanel)/comicWidth));
   document.getElementById('main-div').style.width= jsScale*comicWidth+ widthAd + widthPanel+20+6+"px"; //20 for shadow + 6px for right padding
  //  if(jsScale > 1.00){                                                          // not 1.00 to have it tall enough to display min of 3 ads
        document.getElementById("containerA").style.width= (widthAd*1+widthPanel*1+comicWidth*jsScale)+'px';
        document.getElementById("containerA").style.height= (panelHeight+ comicHeight*jsScale)+'px';
 /*   }
    else{
        jsScale = 1.00;
        document.getElementById("containerA").style.width= (comicWidth + widthAd + widthPanel)+'px';
        document.getElementById("containerA").style.height= (comicHeight+panelHeight) + 'px';
    }*/
/*}*/
var jsScale;
var pageScale;
function changeDiv(){
    var heightOthers= 110;    // 150
    var panelHeight = 27;    // Nav Height = 27 + border height = 0  => 27
    var comicHeight = 449;
    var widthPanel = 0;    // with 2 pixels of shadow (10 + 10 + 12)
    var widthAd = 280;
    var comicWidth = 672;
    var myWidth = 0;
    var myHeight = 0;

    if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    }
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    }
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {//IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }

   jsScale = Math.max(1.12, Math.min((myHeight-panelHeight-heightOthers)/comicHeight, (Math.max(1024,0.85*myWidth)-widthAd-widthPanel)/comicWidth));
   document.getElementById('main-div').style.width= jsScale*comicWidth+ widthAd + widthPanel+20+6+"px"; //20 for shadow + 6px for right padding
 //  if(document.getElementById("right-panel") != null) document.getElementById("right-panel").style.width = '280px';
     //(parseFloat(document.getElementById("main-div").style.width)-20)+'px';
     
     if(window.location.protocol =='https:')
     document.getElementById("content-area").style.width= jsScale*comicWidth+ widthAd + widthPanel-12+"px";
     
       // Comic page + ads + bottom bar container
       else if(document.getElementById("containerA") != null){                                   
        document.getElementById("containerA").style.width= (widthAd*1+widthPanel*1+comicWidth*jsScale)+'px';
        document.getElementById("containerA").style.height= (panelHeight+ comicHeight*jsScale)+'px';
        document.getElementById("content-area").style.width= jsScale*comicWidth+ widthAd + widthPanel+6+"px";
        }
        
        // Comic page container
        else if(document.getElementById("containerB") != null){ 
        document.getElementById("containerB").style.width= (comicWidth*(jsScale-0.01))+'px';
        document.getElementById("containerB").style.height= (comicHeight*(jsScale-0.01))+'px';
        document.getElementById("content-area").style.width= (jsScale-0.01)*comicWidth+"px";
    //    document.getElementById("book-page-bar").style.width= (parseFloat(document.getElementById("main-div").style.width)-20)+'px';
  //      if(document.getElementById("right-panel") != null) document.getElementById("right-panel").style.width = '270px';
        }
        
        //Comicpage + ads container
        else if(document.getElementById("containerPageAds") != null){
        document.getElementById("containerPageAds").style.width= (widthAd*1+widthPanel*1+comicWidth*jsScale)+'px';
        document.getElementById("containerPageAds").style.height= (comicHeight*jsScale)+'px';
        document.getElementById("content-area").style.width= jsScale*comicWidth+ widthAd + widthPanel+6+"px";
   //     document.getElementById("book-page-bar").style.width= (parseFloat(document.getElementById("main-div").style.width)-20)+'px';
        }
        else if(document.getElementById("containerC") != null){ 
        	if(document.getElementById("right-panel") != null)
        		document.getElementById("right-panel").style.marginRight = 15+'px';
        document.getElementById("containerC").style.width= (comicWidth*jsScale)-10+'px';
        document.getElementById("containerC").style.height= (comicHeight*jsScale)+'px';
        document.getElementById("content-area").style.width= jsScale*comicWidth+"px";
    //    document.getElementById("book-page-bar").style.width= (parseFloat(document.getElementById("main-div").style.width)-20)+'px';
  //      if(document.getElementById("right-panel") != null) document.getElementById("right-panel").style.width = '270px';
        }


        else{
        	document.getElementById("content-area").style.width= jsScale*comicWidth-15+"px"; // -15 for left and right padding of the green panel
        }
        
        
    }

function divResize(){
	//alert(document.getElementById("book-page-bar").style.width)
      
      
      
      
         /*       var heightOthers= 105;   // for topbar and menu buttons
                var panelHeight = 32;    // bottombar (links to the same section pages)
                var comicHeight = 449;
                var widthPanel = 0;    // for shadow 20 later
                var widthAd = 273 + 14-5;  //287 width of ad + padding on both sides (-5 for making it work)
                var comicWidth = 672;
                var myWidth = 0, myHeight = 0;
				//alert(jsScale);
                if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
                    myWidth = window.innerWidth;
                    myHeight = window.innerHeight;
                }
                else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'
                    myWidth = document.documentElement.clientWidth;
                    myHeight = document.documentElement.clientHeight;
                }
                else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {//IE 4 compatible
                    myWidth = document.body.clientWidth;
                    myHeight = document.body.clientHeight;
                }
             ////   jsScale = Math.max(1.12, Math.min((myHeight-panelHeight-heightOthers)/comicHeight, (0.85*Math.max(1024,myWidth)-widthAd-widthPanel)/comicWidth));
             ////       document.getElementById("containerB").style.width= (widthAd*1+comicWidth*jsScale)+'px';
               ////     document.getElementById("containerB").style.height= (comicHeight*jsScale)+'px';
                    //alert(jsScale);
                  document.getElementById("book-page-bar").style.width= (0.85* Math.max(myWidth,1024)+6)+'px';
                //   alert(document.getElementById("book-page-bar").style.width+ " "+myWidth);
  /*    if(((myHeight-panelHeight-heightOthers)/comicHeight)> ((Math.max(1024,0.85*myWidth)-widthAd-widthPanel)/comicWidth)){
        	document.getElementById("book-page-bar").style.width= (0.85* Math.max(myWidth,1217)+6)+'px';//1024*1.12
        }
        else{
        	//alert(((Math.max(1024,0.85*myWidth)-widthAd-widthPanel)/comicWidth)/(((myHeight-panelHeight-heightOthers)/comicHeight)));
        	document.getElementById("book-page-bar").style.width= Math.round(widthAd*1+widthPanel*1+comicWidth*jsScale+6)+'px';
        	//alert(Math.round(widthAd*1+widthPanel*1+comicWidth*jsScale+6));
        } */
}
            
function pageResize(){      // for homepage
	//alert("here");
     var heightOthers= 144;    // topbar, nav, title
    var panelHeight = 0;    // Nav Height = 27 + border height = 0  => 27
    var comicHeight = 449;
    var widthPanel = 0;    // with 2 pixels of shadow (10 + 10 + 12)
    var widthAd = 272;
    var comicWidth = 672;
    var myWidth = 0;
    var myHeight = 0;
    var newWidth = 0;

    if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    }
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    }
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {//IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }

   pageScale = Math.max(1.12, Math.min((myHeight-panelHeight-heightOthers)/comicHeight, (Math.max(1024,0.85*myWidth)-widthAd-widthPanel)/comicWidth));
 // alert("2");
   document.getElementById('main-div').style.width= pageScale*comicWidth+ widthAd + widthPanel+20+6+"px"; //20 for shadow + 6px for right padding
    newWidth = parseFloat(document.getElementById('main-div').style.width)-(10+12+272+12+10); // maindiv - others besides comics (shadow, margin, comic, margin, ad, margin, shadow)
       document.getElementById('comicPage').style.width= newWidth + 'px'; 
       document.getElementById("comicPage").style.height= comicHeight *newWidth/comicWidth+'px';
   }




function bookmark_us(url, title){

if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");

else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}

else if(document.all)// ie
window.external.AddFavorite(url, title);

else {
	alert ("Your Browser does not support automatic bookmarking. Please press CTRL+D to bookmark us.");
}
}


function open_page()
{
  location = document.form_openpage.select_openpage.options[document.form_openpage.select_openpage.selectedIndex].value
}

