﻿function hiliteLabel(tPosition) {
	document.getElementById("nav_label").style.backgroundPosition = tPosition;
}


function tmCurrProject() {
	return (document.title);
}


function tmNextProject(tOffset) {
	tList = "math_gadgets,lcd_emulator,aurora,alien_viewer,system_gadgets,setpoint_gaming,haydn,clipasearch,lcd_manager,shoretel,hp_icons,pccillin,stromboli,audiofeast,gaming_mouse_panel,dig_video,harlequin,fathom,music_toys,plexata,gallo,soundmobile";
	projList = tList.split(",");
	currProj = tmCurrProject();
	i = 0;
	while (projList[i] != currProj)
	{
		i++;
	}
	if ((i+1 == projList.length)&&(tOffset == 1)) { tOffset = 0; }
	if ((i == 0)&&(tOffset == -1)) { tOffset = 0; }
	document.location = ("../"+projList[i+tOffset]+"/index.html");
}


function tmScaleiFrame(iframeWindow) {
	if (iframeWindow.document.height) {
		var iframeElement = document.getElementById(iframeWindow.name);
		iframeElement.style.height = iframeWindow.document.height + 'px';
	}
		else if (document.all) {
			var iframeElement = document.all[iframeWindow.name];
			if (iframeWindow.document.compatMode && iframeWindow.document.compatMode!= 'BackCompat') {
				iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
			}
		else {
			iframeElement.style.height = iframeWindow.document.body.scrollHeight + 5 + 'px';
		}
	}
}


function calcHeight() {
	var tHeight = document.getElementById('content').contentWindow.document.body.scrollHeight;
	alert(tHeight);
	document.getElementById('the_iframe').height = tHeight;
}
//onLoad="calcHeight();"


function tmBuildBox(rad) {
      settings = {
          tl: { radius: rad },
          tr: { radius: rad },
          bl: { radius: rad },
          br: { radius: rad },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }
      var tmBoxObject = new curvyCorners(settings, "tmRoundRectBox");
      tmBoxObject.applyCornersToAll();
}



function tmUpdateMenu(tData) {
	if(top.document.title.indexOf("custom interface") == -1) {
		top.location.href = "http://www.tactilemedia.com/test/newsite/";
	}
	top.frames.head.window.document.header.SetVariable("tmCurrMenu",tData);
}

