function background()
{
num = Math.round((background.arguments[0]-1)*Math.random()+1);
document.write('<img src="images/back'+num+'.jpg" alt="" name="backimage" id="backimage" width="1000" height="600" border="0">');
}
function timer()
{
while (timer.arguments[1])
{
z = window.setTimeout('background(timer.arguments[0])', 5000);
}

}
function winop() {
 NC = (document.layers); // Netscape 4.x
 IE = (document.all); // Internet Explorer
 Opera = (document.getElementById); // Opera

	if (IE) {
	x=self.screenLeft + winop.arguments[3];
	y=self.screenTop + winop.arguments[4];
nw=window.open(winop.arguments[0],'small','titlebar=0,status=0,toolbar=0,menubar=0,history=0,scrollbars=0,resizable=1,height='+winop.arguments[2]+',width='+winop.arguments[1]+',left='+x+', top='+y);
}
else {if (NC) {
	x=self.screenX + winop.arguments[3];
	y=self.screenY + winop.arguments[4];
nw=window.open(winop.arguments[0],'small','titlebar=0,status=0,toolbar=0,menubar=0,history=0,scrollbars=0,resizable=1,height='+winop.arguments[2]+',width='+winop.arguments[1]+',screenX='+x+', screenY='+y);
}
else {nw=window.open(winop.arguments[0],'small','titlebar=0,status=0,toolbar=0,menubar=0,history=0,scrollbars=0,resizable=1,height='+winop.arguments[2]+',width='+winop.arguments[1]+',left=50, top=50');}}
}


function winop2() {
 NC = (document.layers); // Netscape 4.x
 IE = (document.all); // Internet Explorer
 Opera = (document.getElementById); // Opera

	if (IE) {
	x=self.screenLeft + winop2.arguments[3];
	y=self.screenTop + winop2.arguments[4];
nw=window.open(winop2.arguments[0],'small2','titlebar=0,status=0,toolbar=0,menubar=0,history=0,scrollbars=0,resizable=1,height='+winop2.arguments[2]+',width='+winop2.arguments[1]+',left='+x+', top='+y);
}
else {if (NC) {
	x=self.screenX + winop2.arguments[3];
	y=self.screenY + winop2.arguments[4];
nw=window.open(winop2.arguments[0],'small','titlebar=0,status=0,toolbar=0,menubar=0,history=0,scrollbars=0,resizable=1,height='+winop2.arguments[2]+',width='+winop2.arguments[1]+',screenX='+x+', screenY='+y);
}
else {nw=window.open(winop2.arguments[0],'small','titlebar=0,status=0,toolbar=0,menubar=0,history=0,scrollbars=0,resizable=1,height='+winop2.arguments[2]+',width='+winop2.arguments[1]+',left=50, top=50');}}
}



function newImage(arg) {
	if (document.pics) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeimages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeimages.arguments.length; i+=2) {
			document[changeimages.arguments[i]].src = changeimages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		m2 = newImage("images/portfolio/02.gif");
		m3 = newImage("images/portfolio/03.gif");
		m4 = newImage("images/portfolio/04.gif");
		m5 = newImage("images/portfolio/05.gif");
		m6 = newImage("images/portfolio/06.gif");
		preloadFlag = true;
	}
}


