/*Define Variables*/
var addthis_pub = 'jbacklunddesign'
var addthis_brand = '<font size=1 color=#803333>JBacklund.com&nbsp;</font>'
var addthis_options = 'favorites, email, delicious, digg, facebook, google, linkedin, live, myspace, reddit, slashdot, stumbleupon, technorati, twitter, more'


/*Mouseover Images*/
if (document.images) {
    bDyn = 1

    var mp3icon0 = new Image()
    mp3icon0.src = "images/_mp3jbd100.png"
    var mp3icon1 = new Image()
    mp3icon1.src = "images/!mp3jbd100.png"

    var buildAGuitar0 = new Image()
    buildAGuitar0.src = "images/_btnBuild-a-Guitar.png"
    var buildAGuitar1 = new Image()
    buildAGuitar1.src = "images/!btnBuild-a-Guitar.png"
}

function hover(A) {
    if (bDyn) eval("document.images." + A + ".src = " + A + "1.src")
}

function idle(A) {
    if (bDyn) eval("document.images." + A + ".src = " + A + "0.src")
}


/*Popup Functions*/
function hidePop(ID) {
    document.getElementById(ID).style.visibility = 'hidden'
}

var z = 5;

function showPop(ID, popType) {
    var nY

    if (popType == 'spec') {
       nY = parseInt(window.center()) + 36;
    }
    else {
       nY = parseInt(window.center()) + 10;
    }

    document.getElementById(ID).style.top = nY + 'px'

    document.getElementById(ID).style.zIndex = z

    z++;

    document.getElementById(ID).style.visibility = 'visible'
}

function p(ID) {
    document.getElementById(ID).style.cursor = 'pointer'
}

window.size = function()
{
	var w = 0;
	var h = 0;

	//IE
	if(!window.innerWidth)
	{
		//strict mode
		if(!(document.documentElement.clientWidth == 0))
		{
			w = document.documentElement.clientWidth;
			h = document.documentElement.clientHeight;
		}
		//quirks mode
		else
		{
			w = document.body.clientWidth;
			h = document.body.clientHeight;
		}
	}
	//w3c
	else
	{
		w = window.innerWidth;
		h = window.innerHeight;
	}
	return {width:w,height:h};
}

window.center = function()
{
	var hWnd = (arguments[0] != null) ? arguments[0] : {width:0,height:0};

	var _y = 0;
	var offsetY = 0;

	//IE
	if(!window.pageYOffset)
	{
		//strict mode
		if(!(document.documentElement.scrollTop == 0))
		{
			offsetY = document.documentElement.scrollTop;
		}
		//quirks mode
		else
		{
			offsetY = document.body.scrollTop;
		}
	}
	//w3c
	else
	{
		offsetY = window.pageYOffset;
	}

	_y = offsetY;

	return(_y);
}


/*Workaround for IE6 layout bugs*/
//if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("MSIE 6") != -1) {
//    document.write("<link rel=\"StyleSheet\" type=\"text/css\" href=\"css/ie_models.css\" media=\"screen\" />")
//}
