var TwistieArray = new Array(0); // var SwitchCount = -1; // setInterval("AutoSwitch()", 1000); function AutoSwitch() { if (SwitchCount == 0) { document.getElementById('mainWindow').style.display = 'inline'; document.getElementById('altWindow').style.display = 'none'; } else { SwitchCount = SwitchCount - 1; } } function SwitchWindow(img,url,alt) { if (alt == null || alt == "undefined") alt = ''; if (document.getElementById('mainWindow')) { document.getElementById('mainWindow').style.display = 'none'; document.getElementById('altWindow').style.display = 'inline'; document.getElementById('altWindow').innerHTML= '' + alt+ ''; // SwitchCount = 5; } } function AddToCart(Doc,Index,Cat) { frm = document.forms[0]; SessionID = (GetCookie("Sid","Error") == "Error") ? SessionID: GetCookie("Sid"); SetCookie("Sid",SessionID,1,"/"); Sid = "&sid=" + GetCookie("Sid"); DocID = "&docid=" + Doc; Cat = (Cat == null || Cat == "undefined") ? "&cat=1": "&cat=" + Cat; Qty = (eval('frm.Qty' + Index)) ? "&qty=" + eval('frm.Qty' + Index + '.value'): "&qty=1"; if (Index == null || Index == "undefined") { Index = (eval('frm.Options' + Doc)) ? "&index=" + eval('frm.Options' + Doc + '.selectedIndex') : "&index=0"; } else { Index = "&index=" + (Index-1); } URLstr = "https://" + location.hostname + "/" + tDbName + "/(AddToCart)?OpenAgent" + Sid + DocID + Cat + Index + Qty + "&EndVars"; self.location = URLstr; } function ShowMyCart() { SessionID = (GetCookie("Sid","Error") == "Error") ? SessionID: GetCookie("Sid"); SetCookie("Sid",SessionID,1,"/"); Sid = "&sid=" + GetCookie("Sid"); URLstr = "https://" + location.hostname + "/" + tDbName + "/frmShoppingCart?OpenForm" + Sid + "&EndVars"; self.location = URLstr; } function SetImage(Index) { URLstr = SetVar(self.location.toString(),'Img',Index); self.location = URLstr; } function MarkRow(DocID, Marker) { RowState = (DocID == tDocID || DocID == ExtraMarker) ? 'Selected': ''; if (RowState == 'Selected') { document.write(Marker); } } function MarkImages(DocID) { RowState = (DocID == tDocID || DocID == ExtraMarker) ? 'Selected': ''; if (document.images['x' + DocID] && RowState == 'Selected') { ImageSrc = document.images['x' + DocID].src.toString() ImageSrc = ImageSrc.substring(0, ImageSrc.indexOf('-off')) + '-on' + ImageSrc.substring(ImageSrc.indexOf('-off') + 4, ImageSrc.length); document.images['x' + DocID].src = ImageSrc; TwistieArray[TwistieArray.length] = 'x' + DocID+ '~' + ImageSrc; } } function NSMarkImages() { for (var i = 0; i < TwistieArray.length; i ++) { TwistieImage = TwistieArray[i].substring(TwistieArray[i].indexOf('x'), TwistieArray[i].indexOf('~')); ImageSrc = TwistieArray[i].substring(TwistieArray[i].indexOf('~') + 1, TwistieArray[i].length); document.images[TwistieImage].src = ImageSrc; } } function ReferFriend() { URLstr = SetVar('/' + tDbName + '/frmRefer?OpenForm','ID',tDocID); URLstr = SetVar(URLstr,'View',DspView); self.location = URLstr; } function HelpLookup() { Str = GetValue('Help','text'); if (Str != 'Classroom...') { Str = ReplaceChar(Str, ' ', '+'); self.location = "/" + tDbName + "/vwHelp/" + Str + "?OpenDocument"; } else { alert('You must select a help topic.'); frm.Help.focus(); } } function StringKey() { tKey = document.forms[0].Query.value; tKey = ReplaceChar(tKey,' ',''); tStr = "&Key&" + tKey; return tStr; } function SearchKey() { // SrchStr = StringKey(); // URLStr = "/" + tDbName + "/(WebSrch)?OpenAgent" + SrchStr; // self.location = URLStr; document.forms["Search"].q.value = document.forms[0].Query.value; document.forms["Search"].submit(); } function PopUpWin(URLstr) { window.open(URLstr,"PopWin","width=460,height=360,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0") }