<!-- 
// Begin

//---------------------------------------//
// SPECIFIC FUNCTIONS
//---------------------------------------//

//PORTFOLIO
// Jquery : applying functions to specific ID's with 'this' in this case targeting sequential id's


$(document).ready(function(){

    
    $("a[id^='pdf']").hover(function(){                  //match anything begining 'screenshot' using XPath syntax
        var linkID = this.id;                                   //collect the id of the link the call originated from
        $('#'+linkID + " .adobeAcrobatIcon").slideDown(500);        //target that specific link id
    }, function(){
        var linkID = this.id;
        $('#'+linkID + " .adobeAcrobatIcon").hide(500);
    });  
    

});




//---------------------------------------//
// GENERIC FUNCTIONS
//---------------------------------------//


function showHideElement(id)
{
	if(document.getElementById(id).style.display == 'none')
	{
		document.getElementById(id).style.display = '';
	}
	else
	{
		document.getElementById(id).style.display = 'none';
	}
}




function hasDOM()
{
    if(document.getElementById && document.childNodes && document.createElement && document.createDocumentFragment){
        return true;
    }
    else
    {
        return false;
    }
}




function printPage() {
  if (window.print != null) {
    window.print();
  } else {
    javascriptAlert('Alert!',"Your browser does not support this shortcut.  Please select File and then Print from your browser's menu.");
  }
}



function getWindowWidth()
{
    var myWidth = 0;
    if( typeof(window.innerWidth) == 'number' ) {
        //Non-IE
        myWidth = window.innerWidth;
    }
    else if(document.documentElement && (document.documentElement.clientWidth))
    {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
    }
    else if(document.body && (document.body.clientWidth))
    {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
    }
  
    return myWidth;
}



function getWindowHeight()
{
    var myHeight = 0;
    if( typeof( window.innerHeight ) == 'number' ) {
        //Non-IE
        myHeight = window.innerHeight;
    }
    else if(document.documentElement && (document.documentElement.clientHeight))
    {
        //IE 6+ in 'standards compliant mode'
        myHeight = document.documentElement.clientHeight;
    }
    else if(document.body && (document.body.clientHeight))
    {
        //IE 4 compatible
        myHeight = document.body.clientHeight;
    }

    return myHeight;
}



function addbookmark(bookmarktitle,bookmarkurl)
{ 
    if(window.sidebar){ 
        window.sidebar.addPanel(bookmarktitle, bookmarkurl,""); 
    }else if(document.all){ 
        window.external.AddFavorite(bookmarkurl, bookmarktitle); 
    }else if(window.opera && window.print){ 
        return true; 
    } 
} 








//---------------------------------------//
// COOKIE FUNCTIONS
//---------------------------------------//
function setCookieValue(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+"; path=/";
}


function getCookieValue(name)
{
    var cookieName = name + "=";
    
    var cookieParts = document.cookie.split(';');
    
    for(var i=0;i < cookieParts.length;i++)
    {
        var cookieData = cookieParts[i];
        
        while (cookieData.charAt(0)==' ')
        {
            cookieData = cookieData.substring(1,cookieData.length);
        
            if (cookieData.indexOf(cookieName) == 0)
            {
                return cookieData.substring(cookieName.length,cookieData.length);
            }
        }
    }
    return null;
}


function eatCookie(name)
{
  setCookieValue(name,"",-1);
}




// END
//-->
