var winH;
var winW;

var page;
var content;

var myimages=new Array()


function STW_preloadimages()
{
	for (i=0;i<preloadimages.arguments.length;i++)
	{
		myimages[i]=new Image();
		myimages[i].src=preloadimages.arguments[i];
	}
}


function STW_swapImage(imaSrc)
{	
	if (document.all)
	{
		var projectimage = document.all['projectimage'];
		projectimage.src = imaSrc;
 	}
	
	
	if (!document.all && document.getElementById)
	{
		var projectimage;
		projectimage = document.getElementById('projectimage');
		projectimage.src= imaSrc;
	}	
}

function openIT(projectlink)
{
	window.open(projectlink , "_self");
}

function openDialog(item, ID, width, height)
{
    var result;
    var myObject = new Object();
    myObject.ID = ID;
    result = window.showModalDialog(item, myObject, "dialogHeight:" + height + "px; dialogWidth:" + width + "px; help=no; status=no; border=thin; scrollbars=no; resizable=no"); 
    return result;
}


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

}


function calcContent(itm, h)
{

	if (document.all)
	{
		itm.style.height = winH - h;
 	}
	
	
	if (!document.all && document.getElementById)
	{
		itm.height = winH - h;
	}

}

function hideImage2( imaName )
{
	if (document.all)
	{
		eval(imaName+'.style.visibility = "hidden"');
	}
}