var sitewindow = '';
function openSiteWindow(url, width, height, scroll)
{
    if (!sitewindow.closed && sitewindow.location)
        sitewindow.close();
    
    sitewindow=window.open(url,'name',"'height="+ height + ",width=" + width + ",resizable="+scroll+",scrollbars="+ scroll +"'");
    if (!sitewindow.opener) sitewindow.opener = self;
    
    if (window.focus) 
        sitewindow.focus();
}
        
function resizeThumBox()
{
    var oldMax = stripMax;
    var wSizes = window.getCoordinates();
    var tSizes = $("thumbox").getCoordinates();
    var windowHeight = wSizes.height;
    var thumboxHeight = tSizes.height + tSizes.top;
    if (windowHeight < thumboxHeight)
        (stripMax - 1 >= 1)? stripMax = stripMax - 1 : stripMax = 1;
    else if(windowHeight >= thumboxHeight)
    {	
    	(stripMax + 1 <= 3)? stripMax = stripMax + 1 : stripMax = 3;
    }
    if(oldMax != stripMax)
        initGlobals();
}

function changeSlider(whatXML)
{
    xmlFile = whatXML;
    divContainer.style.top = "0px"; 
    displayResult();
    initGlobals();
    setVArrows();
    initLytebox();
   document.getElementById("portfolioinstructions").style.display = "block";

}

function setImageLinks(e)
{
	if(e)
		var srcElement = (e.srcElement)? e.srcElement : e.target;
	
	var tabs = document.getElementById("portfolioTabs");
	var links = tabs.getElementsByTagName("a"); 
	for (var  i =0; i < links.length;i++)
	{
		links[i].style.textDecoration = "none"; 
	}
	if(srcElement)
		srcElement.style.textDecoration = "underline";
	else
	{
		if(xmlFile == "appdesign.xml")
	     {
	    	 document.getElementById("linkApp").style.textDecoration = "underline";
	     }
	    else if(xmlFile == "identity.xml")
        {
	    	document.getElementById("linkIdentity").style.textDecoration = "underline";
        }
	}
}




        
