var myHeight=0;
var myWidth=0;
var scroll_height=0;
var scroller;
var initialScroll=0;


var message="";
var title="";
var msgbox_width=642;
var title_image="images/User-16x16.png";
var message_image="images/User-64x64.png"
var ok_picture="images/close.gif"




// function setSize()
// evaluates the hight and width of each window (in this case of each frame)
// returns height and width as integers -- the height and width of the frame


function setSize() {

	if( typeof( window.innerWidth ) == 'number' ) {
		myWidth = window.innerWidth; myHeight = window.innerHeight;	myWidth=myWidth-16;scroll_height=window.pageYOffset;
	} else if( document.documentElement && ( document.documentElement.clientWidth ||document.documentElement.clientHeight ) ) {
		myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				myWidth = document.body.clientWidth; myHeight = document.body.clientHeight;
	}

	return {myHeight:myHeight,myWidth:myWidth,scroll_height:scroll_height};
}


function msgbox(str,js_command){


	if(!top.alertPresent)
		{
		
			top.alertPresent=true;
		
		
			while(message.indexOf("<br/>")>-1){
			message=message.replace("<br/>","\n");
			}	

		// myHeight=top.myHeight;
			if(top.myHeight<=top.document.body.clientHeight)
				{
					myHeight=top.document.body.clientHeight;
				}
			else
				{
					myHeight=top.myHeight;
				}
		myWidth=top.myWidth;
		scroll_height=top.scroll_height;



			top.document.getElementById('error_message').style.width=msgbox_width+"px";



			top.document.getElementById('modal').style.height=scroll_height-0+myHeight+"px";
			top.document.getElementById('modal').style.width=myWidth+"px";

			
			
			
			
			
			
			
			
			
top.document.getElementById('error_message').innerHTML="<div class='close'><a href='#' onclick='closeError(&quot;"+js_command+"&quot;)'><img src='http://www.bigwhiskeygroogruxking.com/images/popup/close.jpg' width='35' height='35' border='0' ></a></div>"+
	"<div class='clear'></div>"+
		"<div id='textonleft' align='center'>Highlights include the funk-rock rave-up Shake Me Like a Monkey, the stirring ballad Lying In The Hands Of God, the swampy rocker Alligator Pie (Cockadile), radio-friendly fare like Why I Am, which features playful horns over a solid rock riff and a hooky chorus, and Funny the Way It Is, which parlays a subtle intro into a soaring, syncopated anthem.</div>"+
		"<div id='textonright' align='center'><i><b>It's best album yet</b></i><br>- Billboard<br><br><i><b>Heaviest album yet, both musically and emotionally</b></i><br>- Rolling Stone</div>"+
		"<div id='buttons'>"+
		"<div id='roadblock-left'>"+
		"<div class='itunes'><a href='albumpass-itunes.html'><img src='http://www.bigwhiskeygroogruxking.com/images/popup/itunes_default.jpg' border='0' width='164' height='39'></a></div>"+	
		"</div>"+
		
		
		"<div id='roadblock-middle'>"+
		"<div class='amazonmp3'><a href='amazonmp3.html' target='_blank'><img src='http://www.bigwhiskeygroogruxking.com/images/popup/amazonmp3_default.jpg' border='0'width='164' height='39'></a></div>"+
		"</div>"+
		
		"<div id='roadblock-right'>"+
		"<div class='amazon'><a href='cd.html'target='_blank'><img src='http://www.bigwhiskeygroogruxking.com/images/popup/amazon_default.jpg' border='0' width='164' height='39'></a></div>"+
		"</div>"+
		
		
		
		
		
		"</div>"
	

	
	
	
			top.document.getElementById('error_message').style.top=myHeight/50+"px";
			top.document.getElementById('error_message').style.left=(myWidth-msgbox_width)/2+"px";
			top.document.getElementById('error_message').style.display='block';
		}
	else
		{
			return;
		}
}


function closeError(x){
	top.document.getElementById('error_message').style.display='none';
	top.document.getElementById('error_title_back').style.display='none';
	top.document.getElementById('error_title').style.display='none';	
	
	top.document.getElementById('modal').style.height='0px';
	top.document.getElementById('modal').style.width='0px';
	if(x!="")
		{
			if(top.frames['iframe'])
				{
					eval("top.frames['iframe']."+x);
				}
			else
				{
					eval("top.frames['main']."+x);
				}
		}
}

function openModal(){

		if(top.myHeight<=top.document.body.clientHeight)
			{
				myHeight=top.document.body.clientHeight;
			}
		else
			{
				myHeight=top.myHeight;
			}
		myWidth=top.myWidth;
		scroll_height=top.scroll_height;
	top.document.getElementById("modal").style.backgroundColor="#000000";	
	top.document.getElementById("modal").style.opacity='.75';
	top.document.getElementById("modal").style.filter='alpha(opacity=75)'
	top.document.getElementById('modal').style.height=scroll_height-5+myHeight+"px";
	top.document.getElementById('modal').style.width=myWidth+"px";
}


function closeModal(){
	top.document.getElementById('modal').style.height='0px';
	top.document.getElementById('modal').style.width='0px';
	top.document.getElementById("modal").style.opacity='.30';
	top.document.getElementById("modal").style.filter='alpha(opacity=30)'
}


function increasePicture(amount,pic_id){
        document.getElementById(pic_id).width=document.getElementById(pic_id).width-0+1;
        document.getElementById(pic_id).height=document.getElementById(pic_id).height-0+1;
        
        if(amount>=1)
              {
                  amount=amount-1;
                  setTimeout("increasePicture("+amount+",'"+pic_id+"')","1")
              }
         else
             {
                 return;
             }        
}


function decreasePicture(amount,pic_id){
    
        document.getElementById(pic_id).width=document.getElementById(pic_id).width-1;
        document.getElementById(pic_id).height=document.getElementById(pic_id).height-1;
        
        if(amount>=1)
              {
                  amount=amount-1;
                  setTimeout("decreasePicture("+amount+",'"+pic_id+"')","1")
              }
         else
             {
                 return;
             }        
}


function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+";";
	
	openModal()
	msgbox("","")	
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie;
	if(ca.indexOf(nameEQ)==-1)
		{
			createCookie('bigwhiskey005','1',14);
		}
	return null;
}

