function openCloneWindow(href) {
	var iWindowWidth = -1;
	var iWindowHeight = -1;
	var sSizeSpecifications = '';
	var now = new Date();
	var sWindow = 'windowName' + now.getHours() + now.getMinutes() + now.getSeconds() + now.getMilliseconds();

	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		iWindowWidth = window.innerWidth;
		iWindowHeight = window.innerHeight;
		if (iWindowWidth > screen.availWidth) {
			iWindowWidth = screen.availWidth;
		}
		if (iWindowHeight > screen.availHeight) {
			iWindowHeight = screen.availHeight;
		}
	} else if( document.documentElement &&
		( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		iWindowWidth = document.documentElement.clientWidth;
		iWindowHeight = document.documentElement.clientHeight;
		if (iWindowWidth > screen.availWidth) {
			iWindowWidth = screen.availWidth;
		}
		if (iWindowHeight > screen.availHeight) {
			iWindowHeight = screen.availHeight;
		}
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		iWindowWidth = document.body.clientWidth + 28;
		iWindowHeight = document.body.clientHeight + 134;
		if (iWindowWidth > screen.availWidth) {
			iWindowWidth = screen.availWidth;
		}
		if (iWindowHeight > screen.availHeight) {
			iWindowHeight = screen.availHeight;
		}
	}
	
	if (iWindowWidth > -1 && iWindowHeight > -1) {
		sSizeSpecifications = ',width=' + iWindowWidth + ',height=' + iWindowHeight;
	}

	window.open(href,sWindow,'resizable=yes,scrollbars=auto,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes' + sSizeSpecifications);
}

function openPortraitWindow(href) {
	var now = new Date();
	var sWindow = 'windowName' + now.getHours() + now.getMinutes() + now.getSeconds() + now.getMilliseconds();
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		iWindowHeight = screen.availHeight;
		iWindowWidth = parseInt(screen.availHeight / 1.4);
		if (iWindowWidth > screen.availWidth) {
			iWindowWidth = screen.availWidth;
		}
	} else if( document.documentElement &&
		( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		iWindowHeight = screen.availHeight;
		iWindowWidth = parseInt(screen.availHeight / 1.4);
		if (iWindowWidth > screen.availWidth) {
			iWindowWidth = screen.availWidth;
		}
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		iWindowHeight = screen.availHeight;
		iWindowWidth = parseInt(screen.availHeight / 1.4);
		if (iWindowWidth > screen.availWidth) {
			iWindowWidth = screen.availWidth;
		}
	}


	sSizeSpecifications = ',width=' + iWindowWidth + ',height=' + iWindowHeight+',top=0,screenY=0';
	window.open(href,sWindow,'resizable=yes,scrollbars=auto,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes' + sSizeSpecifications);
}

function openPopupWindow(href,iWindowWidth,iWindowHeight) {
	var now = new Date();
	var sWindow = 'windowName' + now.getHours() + now.getMinutes() + now.getSeconds() + now.getMilliseconds();

	sSizeSpecifications = ',width=' + iWindowWidth + ',height=' + iWindowHeight;
	window.open(href,sWindow,'resizable=yes,scrollbars=auto,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no' + sSizeSpecifications);
}

function openNewWindow(URL,targetName,sizeX,sizeY) {
	window.open(URL,'rob_' + targetName,'toolbar=yes,copyhistory=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + sizeX + ',height=' + sizeY + ',screenY=20,screenX=20,left=20,top=20');
}

function imagerotator_set(imagerotator, direction) {
	imagerotator_clearall (imagerotator);
	imagecurrent = eval('imagerotator' + imagerotator + 'current');
	imagecount = eval('imagerotator' + imagerotator + 'count');
	imagenew = imagecurrent + direction;
	if (imagecurrent + direction < 0) {
		imagenew = imagecount - 1;
	}
	if (imagecurrent + direction > imagecount - 1) {
		imagenew = 0;
	}
	eval('imagerotator' + imagerotator + 'current = ' +  imagenew);
	document.getElementById('imagerotator' + imagerotator + '_image' + imagenew).style.display = "";
}

function imagerotator_clearall (imagerotator) {
	imagecount = eval('imagerotator' + imagerotator + 'count');
	for (i = 0; i < imagecount; i++) {
	document.getElementById('imagerotator' + imagerotator + '_image' + i).style.display = "none";
	}
}					
	

function SubmitForm(num){
document.forms.search.Terms.value = document.forms.search.Terms_vis.value
search.submit();	 
}
						 	

