if ( 0 <= navigator.userAgent.indexOf('Opera') ) 

{
        OPERA = (window.opera);
        NN4   = (document.layers);

	function loadHandler() {
		if (NN4 || OPERA) {
			origWidth  = this.innerWidth;
			origHeight = this.innerHeight;
                        if (OPERA) resizeHandler();
		}
	}
	onload = loadHandler;

        function resizeHandler() {
	        if (this.innerWidth != origWidth
	            ||
	            this.innerHeight != origHeight) location.reload();
	        if (OPERA) setTimeout('resizeHandler()',500);
        }
        if (NN4) onresize = resizeHandler;
}

function domRollover() {
	if (navigator.userAgent.match(/Opera (\S+)/)) {
		var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);
	}
	if (!document.getElementById||operaVersion <7) return;
	var imgarr=document.getElementsByTagName('img');
	var imgPreload=new Array();
	var imgSrc=new Array();
	var imgClass=new Array();
	for (i=0;i<imgarr.length;i++){
		if (imgarr[i].className.indexOf('domroll')!=-1){
			imgSrc[i]=imgarr[i].getAttribute('src');
			imgClass[i]=imgarr[i].className;
			imgPreload[i]=new Image();
			if (imgClass[i].match(/domroll (\S+)/)) {
				imgPreload[i].src = './' + imgClass[i].match(/domroll (\S+)/)[1]
			}
			imgarr[i].setAttribute('xsrc', imgSrc[i]);
			imgarr[i].onmouseover=function(){
				this.setAttribute('src','./'+this.className.match(/domroll (\S+)/)[1])
			}
			imgarr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}
domRollover();
transition('fade');
var customformelements;

if (customformelements==1) {window.Custom.init();}

function hidePortIndex(){
                $("#portH1").hide();
                $("#portfolioIndexIdentity").hide();
                $("#portfolioIndexPrint").hide();
                $("#portfolioIndexWeb").hide();
		scroll(0,0);
}

function unselectLinks() {
                $("#portLinkAll").removeClass("selected", 0);
                $("#portLinkI").removeClass("selected", 0);
                $("#portLinkW").removeClass("selected", 0);
                $("#portLinkP").removeClass("selected", 0);
}

$(document).ready(function(){
	if(window.location.hash.indexOf('portfolioIndexIdentity') > -1){hidePortIndex();$("#portfolioIndexIdentity").show();unselectLinks();$("#portLinkI").addClass("selected");scroll(0,0);return false;}
	if(window.location.hash.indexOf('portfolioIndexPrint') > -1){hidePortIndex();$("#portfolioIndexPrint").show();unselectLinks();$("#portLinkP").addClass("selected");scroll(0,0);return false;}
	if(window.location.hash.indexOf('portfolioIndexWeb') > -1){hidePortIndex();$("#portfolioIndexWeb").show();unselectLinks();$("#portLinkW").addClass("selected");scroll(0,0);return false;}

$('a').each(
                        function(i){                                    
                                if(this.href.indexOf(window.location.host)<0){                          
                                        $(this).attr("target","_blank")                 
                                }       
                        }                                               
                )
});
	$("#portLinkAll").click(function(){$("#portH1").show();$("#portfolioIndexIdentity").show();$("#portfolioIndexPrint").show();$("#portfolioIndexWeb").show();unselectLinks();$(this).addClass("selected");return false;});
	$("#portLinkI").click(function(){hidePortIndex();$("#portfolioIndexIdentity").show();unselectLinks();$(this).addClass("selected");return false;});
	$("#portLinkP").click(function(){hidePortIndex();$("#portfolioIndexPrint").show();unselectLinks();$(this).addClass("selected");return false;});
	$("#portLinkW").click(function(){hidePortIndex();$("#portfolioIndexWeb").show();unselectLinks();$(this).addClass("selected");return false;});

