// Copyright 2007 Scendix Software, Inc. (www.scendix.com) top.wwwrootpath = "http://www.tinselvision.com/"; function Elem(objname) { return document.getElementById(objname); } function helpwindow(page) { window.open(page); } function getAbsoluteLeft(o) { // Get an object left position from the upper left viewport corner // Tested with relative and nested objects oLeft = o.offsetLeft // Get left position from the parent object while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element oParent = o.offsetParent // Get parent object reference oLeft += oParent.offsetLeft // Add parent left position o = oParent } // Return left postion return oLeft } function getAbsoluteTop(o) { // Get an object top position from the upper left viewport corner // Tested with relative and nested objects oTop = o.offsetTop // Get top position from the parent object while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element oParent = o.offsetParent // Get parent object reference oTop += oParent.offsetTop // Add parent top position o = oParent } // Return top position return oTop } function addOption(sel,val,t) { opt = document.createElement("option"); opt.value = val; opt.text = t; sel.options.add(opt); } function easeInOut(minValue,maxValue,totalSteps,actualStep,powr) { var delta = maxValue - minValue; //if(actualStep == 1) // alert("min: " + minValue + " delta: " + delta + " step: " + (((1 / totalSteps)*actualStep)*delta)); //var stepp = minValue+(Math.pow(((1 / totalSteps)*actualStep),powr)*delta); var stepp = minValue+(delta / totalSteps)+(delta / totalSteps)*(actualStep-1); return Math.max(Math.ceil(stepp), 0); } function mod(divisee,base) { return Math.round(divisee - (Math.floor(divisee/base)*base)); } function BuyPackage(pid) { var uri = "https://secure.tinselvision.com/selfCare/default.aspx?navGraph=ShoppingCart"; uri += "&view=ShoppingCartAdd"; uri += "&aid=tinselcinema"; uri += "&iid="+pid; uri += "&returnUrl=http%3A%2F%2Fwww.tinselvision.com%2F%3Fpage%3Dthankyou"; uri += "&cancelUrl=http%3A%2F%2Fwww.tinselvision.com%2F%3Fpage%3Dcancelpayment"; uri += "&returnUrl2=http%3A%2F%2Fwww.tinselvision.com%2F%3Fpage%3Dthankyou"; document.location.href = uri; } function AddLoadSink(evtFunc) { // Add event with wide browser support if ( typeof window.addEventListener != "undefined" ) window.addEventListener( "load", evtFunc, false ); else if ( typeof window.attachEvent != "undefined" ) window.attachEvent( "onload", evtFunc ); else { if ( window.onload != null ) { var oldOnload = window.onload; window.onload = function ( e ) { oldOnload( e ); eval(evtFunc + "()"); }; } else window.onload = evtFunc; } } function isdefined(obj) { return (obj + "" != "undefined"); }