function OpenProduct(Product) {
	var strURL = '/Web/Content/Tours/'+Product+'.html';
	window.open(strURL,"InfoTourWindow","height=462,width=900,scrollbars=no,resizable=no");
}

function OpenRegistration(clientname) {
	var strURL = 'https://smart.infotecnet.com/Registration/Reg_index.asp?Client='+clientname+'&ApplicationCode=MM';
	window.open(strURL,"InfoRegistrationWindow","height=450,width=800,status=1,scrollbars=yes,resizable=yes");
}

function OpenScreenshot(ProductName,ImgNb) {
	var strURL = '/Web/Content/Screenshots/' + ProductName + '.asp?IMG=' + ImgNb;
	window.open(strURL,"InfoScreenWindow","height=460,width=600,scrollbars=1,resizable=1");
}

function OpenCaseStudy(Nb) {
	var strURL = '/Web/Content/Study/' + Nb + '.asp';
	window.open(strURL,"InfoStudyWindow","height=460,width=600,scrollbars=no,resizable=no");
}

function swapImageOn(imageName) {
	imgOn = eval(imageName + "_On.src");
	document.getElementById(imageName).src = imgOn;
//	document[imageName].src = imgOn;
}
function swapImageOff(imageName) {
	imgOff = eval(imageName + "_Off.src");
	document.getElementById(imageName).src = imgOff;
//	document[imageName].src = imgOff;
}
function swapImageOffSelected(imageName) {
	imgOff = eval(imageName + "_Selected.src");
	document.getElementById(imageName).src = imgOff;	
//	document[imageName].src = imgOff;
}

// Pop up functions
function showPopup(elem,divname, txt, leftadd, topadd){
	pobj = document.getElementById(divname);
	pobj.style.left = getLeft(elem)+leftadd;
	pobj.style.top = getTop(elem)+topadd;
	pobj.innerHTML = txt;
	pobj.style.visibility = 'visible';
}

function hidePopup(divname){
	pobj = document.getElementById(divname);
	pobj.style.visibility = 'hidden';
}

function getLeft(MyObject){
    if (MyObject.offsetParent)
        return (MyObject.offsetLeft + getLeft(MyObject.offsetParent));
    else 
        return (MyObject.offsetLeft);
} 

function getTop(MyObject) {
    if (MyObject.offsetParent)
        return (MyObject.offsetTop + getTop(MyObject.offsetParent));
    else
        return (MyObject.offsetTop);
}

if (self!=top) top.location.href = self.location.href;
