﻿function $(id) {
    return document.getElementById(id);
}
function createXMLHttpRequest() {
   try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
   try { return new XMLHttpRequest(); } catch(e) {}
   alert("XMLHttpRequest (AJAX) not supported by your browswer.");
   return null;
 } 
/* ForceClick version 2.0 */
function forceClick(e, elemId)
{
    var keyPressed;
    var elem = $(elemId); 

    if (document.all) { //  IE 6+
        keyPressed = e.keyCode;
    } 
    else { // Firefox 
        keyPressed = e.which;
    }
    //13 = ASCII code for Enter key
    if (keyPressed == 13) { 
        if(elem == null)
            alert('Button not found!');
        else {
            // elem.click();  - this is old, now using mousevevnts
            var evt = document.createEvent("MouseEvents");
            evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false,false, false, false, 0, null);
            elem.dispatchEvent(evt);  
           } 
    } 
}
/* Login and Search redirectors 
 function login() {
       var url = 'http://wisetopic.com/?action=login';
       window.location = url;
   }
     */  
   /* AJAX XML Login V2 
   function login2() {
    var xhReq = createXMLHttpRequest();
   xhReq.open("GET", "sumXML.phtml?figure1=10&figure2=20", true);
   xhReq.onreadystatechange = function() {
     if (xhReq.readyState != 4) { return; }
     xml = xhReq.responseXML;
     var figure1 = xml.getElementsByTagName("figure")[0].firstChild.nodeValue;
     var figure2 = xml.getElementsByTagName("figure")[1].firstChild.nodeValue;
     var sum = xml.getElementsByTagName("outputs")[0].firstChild.nodeValue; 
   };
   xhReq.send(null);
 });
} */

var httpLogout;
function logout() {
    var loginUrl = "_inc/land/ajaxLogout.aspx"; 
   
    if (window.XMLHttpRequest) { // FF     
      httpLogout=new XMLHttpRequest();
      httpLogout.onreadystatechange=loadLogout;
      httpLogout.open("GET", loginUrl, true);
      httpLogout.send(null);      
   }
    else if (window.ActiveXObject) { // IE
      httpLogout=new ActiveXObject('Microsoft.XMLHTTP');
      if (httpLogout) {
         httpLogout.onreadystatechange=loadLogout;
         httpLogout.open('GET', "_inc/land/ajaxLogout.aspx", true);
         httpLogout.send();
      }      
    }
  }
 function loadLogout() {
   if (httpLogout.readyState == 4) { 
     $('loginBox').innerHTML = httpLogout.responseText;
     $('signUpNow').style.display = "visible"; 
     $('userBox').innerHTML = "<h3><span class=\"push\">Not a Member Yet?</span></h3>"; 
     $('welcome').innerHTML = "<a href=\"/register\">&#187; Sign Up for a Free account!</a>";
    } 
  } 
 
 var httpLogin; 
 function ajaxLogin() {
   var loginUrl = "_inc/land/ajaxLogin.aspx?uname="+$('username').value+"&pwd="+$('password').value; 
   if (window.XMLHttpRequest) { // FF     
      httpLogin=new XMLHttpRequest();
      httpLogin.onreadystatechange=valUser;
      httpLogin.open("GET", loginUrl, true);
      httpLogin.send(null);      
   }
    else if (window.ActiveXObject) { // IE
      httpLogin=new ActiveXObject('Microsoft.XMLHTTP');
      if (httpLogin) {
         httpLogin.onreadystatechange=valUser;
         httpLogin.open('GET', "_inc/land/ajaxLogin.aspx?uname="+$('username').value+"&pwd="+$('password').value, true);
         httpLogin.send();
      }      
    }
  }
 function valUser() {
    if (httpLogin.readyState == 4) {
      if (httpLogin.status==200) {
           $('loginBox').innerHTML = httpLogin.responseText;
          getUserBox('1'); 
      }
    }
  } 

var httUserBox;
function getUserBox(userId) {
    $('signUpNow').style.display = "none";
    var userBoxUrl = "_inc/land/loggedInBox.aspx?userid="+userId; 
    if (window.XMLHttpRequest) { // FF          
          httUserBox=new XMLHttpRequest();
          httUserBox.onreadystatechange=loadUserBox;
          httUserBox.open("GET", userBoxUrl, true);
          httUserBox.send(null);      
     }
     else if (window.ActiveXObject) { // IE
      httUserBox=new ActiveXObject('Microsoft.XMLHTTP');
      if (httUserBox) {
         httUserBox.onreadystatechange=loadUserBox;
         httUserBox.open('GET', "_inc/land/loggedInBox.aspx?userid="+userId, true);
         httUserBox.send();
      }      
   }
 } 
 function loadUserBox() {
    if (httUserBox.readyState == 4) {
      if (httUserBox.status==200) {
      $('userBox').innerHTML = httUserBox.responseText;
      $('userBox').className = 'fuck';
       }
    }
  } 
  function advancedSearch() {
      var url =  'http://wisetopic.com/search/?keyword='+$("search").value;
      window.location = url;
   }     
   
/* Tab Systems */
 function MusicTab(tabName) {
    // set all tabs to "off"
    $("topartist").className='';
    $("topsong").className=''; 
    $("userreviews").className=''; 
    $("musicvideos").className=''; 
    $("playlists").className=''; 
    $("artistsjoin").className='';  
    // set on style
    $(tabName).className='on';   
     // reset the current index to 1
    $('music_start').value = '2';  
     // set current tab index
    $("music_curTab").value = tabName; 
    // reset data
    musicScroll(1);
 }  
 function musicScroll(dir) {
   var curTab = $("music_curTab").value;
   // deletgate functions 
   if(curTab == 'topsong') {
       getTopsongs(dir);
    } else if(curTab == 'topartist') {
       getArtists(dir);
    } else if(curTab == 'userreviews') {
       getUserReviews(dir);
    } else if(curTab == 'musicvideos') {
       getMusicVideos(dir);
    } else if(curTab == 'playlists') {
       getPlaylists(dir);
    } 
  }

/* featured album */
var httpFeatAlbum;
function getFeatAlb(dir) {

   var start = parseInt($('albumStart').value) - dir;
   var url = "_inc/land/get_featuredAlbum.aspx?start="+start; 
   $("albumStart").value = start;
      
   if (window.XMLHttpRequest) { // FF          
      httpFeatAlbum=new XMLHttpRequest();
      httpFeatAlbum.onreadystatechange=loadFeatAlb;
      httpFeatAlbum.open("GET", url, true);
      httpFeatAlbum.send(null);      
   }
   else if (window.ActiveXObject) { // IE
       httpFeatAlbum=new ActiveXObject('Microsoft.XMLHTTP');
        if (httpFeatAlbum) {
           httpFeatAlbum.onreadystatechange=loadFeatAlb;
           httpFeatAlbum.open('GET', "_inc/land/get_featuredAlbum.aspx?userid="+userId, true);
           httpFeatAlbum.send();
      }      
   }
 } 
 function loadFeatAlb() {
  if (httpFeatAlbum.readyState == 4) {
       if (httpFeatAlbum.status == 200) {
            $('featAlbum').innerHTML = httpFeatAlbum.responseText;
        }
      }
   } 


/* Music Ajax */

    function showNews() {
        $('music_news').style.visibility = 'visible';
        $('featAlbumBox').style.visibility = 'hidden'; 
    } 
    function showAlbums() {
        $('music_news').style.visibility = 'hidden';
        $('featAlbumBox').style.visibility = 'visible'; 
    }  

   /* music - User Reviews */
    var httpUserReviews;
    function getUserReviews(dir){
   
   // hide the featured album box
   $('featAlbumBox').style.display = 'none';
   
   // inline styles for the box
   $('music_box').style.width = '760px';
    
    var start = parseInt($('music_start').value);
    start = start - dir;
    
       if (window.XMLHttpRequest) { // FF
          httpUserReviews=new XMLHttpRequest();
          httpUserReviews.onreadystatechange=loadUserReviews;
          var url = "_inc/land/get_UserReviews.aspx?start="+start;
          httpUserReviews.open("GET", url, true);
          $("music_start").value = start;    
          httpUserReviews.send(null);
       } else if (window.ActiveXObject) { // IE
          httpUserReviews=new ActiveXObject('Microsoft.XMLHTTP');
          if (httpUserReviews) {
             httpUserReviews.onreadystatechange=loadUserReviews;
             httpUserReviews.open('GET', '_inc/land/get_UserReviews.aspx?start='+start, true);
             $("music_start").value = start;
             httpUserReviews.send();
          }
       }
    }
      function loadUserReviews() {
         if (httpUserReviews.readyState == 4) {
           if (httpUserReviews.status==200) {
                $('music_items_list').innerHTML = httpUserReviews.responseText;
            }
          }
        }
       
    /* music - Videos */
    var httpMusicVideos;
    function getMusicVideos(dir){
            var start = parseInt($('music_start').value);
            start = start - dir;
               if (window.XMLHttpRequest) { // FF
                  httpMusicVideos=new XMLHttpRequest();
                  httpMusicVideos.onreadystatechange=loadMusicVideos;
                  var url = "_inc/land/get_MusicVideos.aspx?start="+start;
                  httpMusicVideos.open("GET", url, true);
                  $("music_start").value = start;    
                  httpMusicVideos.send(null);
               } else if (window.ActiveXObject) { // IE
                  httpMusicVideos=new ActiveXObject('Microsoft.XMLHTTP');
                  if (httpMusicVideos) {
                     httpMusicVideos.onreadystatechange=loadMusicVideos;
                     httpMusicVideos.open('GET', '_inc/land/get_MusicVideos.aspx?start='+start, true);
                     $("music_start").value = start;
                     httpMusicVideos.send();
                  }
               }
            }
      function loadMusicVideos() {
         if (httpMusicVideos.readyState == 4) {
           if (httpMusicVideos.status==200) {
                $('music_items_list').innerHTML = httpMusicVideos.responseText;
            }
          }
        } 
       
     /* music - playlists */
    var httpPlaylists;
    function getPlaylists(dir){
            var start = parseInt($('music_start').value);
            start = start - dir;
               if (window.XMLHttpRequest) { // FF
                  httpPlaylists=new XMLHttpRequest();
                  httpPlaylists.onreadystatechange=loadPlaylists;
                  var url = "_inc/land/get_Playlists.aspx?start="+start;
                  httpPlaylists.open("GET", url, true);
                  $("music_start").value = start;    
                  httpPlaylists.send(null);
               } else if (window.ActiveXObject) { // IE
                  httpPlaylists=new ActiveXObject('Microsoft.XMLHTTP');
                  if (httpPlaylists) {
                     httpPlaylists.onreadystatechange=loadPlaylists;
                     httpPlaylists.open('GET', '_inc/land/get_Playlists.aspx?start='+start, true);
                     $("music_start").value = start;
                     httpPlaylists.send();
                  }
               }
            }
      function loadPlaylists() {
         if (httpPlaylists.readyState == 4) {
           if (httpPlaylists.status==200) {
                $('music_items_list').innerHTML = httpPlaylists.responseText;
            }
          }
        }  
       
    /* Top Songs*/
    var httpTopsongs;
      function getTopsongs(dir) {
            var start = parseInt($('music_start').value);
            start = start - dir;
              if (window.XMLHttpRequest) {
                  httpTopsongs=new XMLHttpRequest();
                  httpTopsongs.onreadystatechange=loadTopsongs;
                 var url = "_inc/land/get_topSongs.aspx?start="+start;
                 httpTopsongs.open("GET", url, true);
                  $("music_start").value = start;    
                  httpTopsongs.send(null);
               } else if (window.ActiveXObject) { //IE
                  httpTopsongs=new ActiveXObject('Microsoft.XMLHTTP');
                  if (httpTopsongs) {
                     httpTopsongs.onreadystatechange=loadTopsongs;
                     httpTopsongs.open('GET', '_inc/land/get_topSongs.aspx?start='+start, true);
                     $("music_start").value = start;
                     httpTopsongs.send();
                  }
               }
            }
      function loadTopsongs() {
         if (httpTopsongs.readyState == 4) {
           if (httpTopsongs.status==200) {
           $('music_items_list').innerHTML = httpTopsongs.responseText;
          }
         }
      }


    /* AJAX to page through community users */
    var httpUsers;
      function getUsers(dir) {
            var start = parseInt($('community_users_start').value);
                  start = start - dir;
               if (window.XMLHttpRequest) { // FF
                  httpUsers=new XMLHttpRequest();
                  httpUsers.onreadystatechange=loadUsers;
                  httpUsers.open("GET", "_inc/land/get_users.aspx?start="+start, true);
                  $("community_users_start").value = start;    
                  httpUsers.send(null);
               } else if (window.ActiveXObject) { //IE
                  httpUsers=new ActiveXObject('Microsoft.XMLHTTP');
                  if (httpUsers) {
                     httpUsers.onreadystatechange=loadUsers;
                     httpUsers.open('GET', '_inc/land/get_users.aspx?start='+start, true);
                     $("community_users_start").value = start;
                     httpUsers.send();
                  }
               }
            }

      function loadUsers() {
         if (httpUsers.readyState == 4) {
           if (httpUsers.status==200) {
                  $('community_users_list').innerHTML = httpUsers.responseText;
                  }
            }
      }
  

/* AJAX to page through wisematch users */
	var httpWisematch;
	  function getWiseMatchUsers(dir) {
            var start = parseInt($('WiseMatch_users_start').value);
                  start = start - dir;
               if (window.XMLHttpRequest) { // FF, Mozilla, Safari,
                  httpWisematch=new XMLHttpRequest();
                  httpWisematch.onreadystatechange=loadWiseMatchUsers;
                  httpWisematch.open("GET", "_inc/land/get_WiseMatch_Users.aspx?start="+start, true);
                  $("WiseMatch_users_start").value = start;    
                  httpWisematch.send(null);
               } else if (window.ActiveXObject) { //IE
                  httpWisematch=new ActiveXObject('Microsoft.XMLHTTP');
                  if (httpWisematch) {
                     httpWisematch.onreadystatechange=loadWiseMatchUsers;
                     httpWisematch.open('GET', '_inc/land/get_WiseMatch_Users.aspx?start='+start, true);
                     $("WiseMatch_users_start").value = start;
                     httpWisematch.send();
                  }
               }
            }

      function loadWiseMatchUsers() {
         if (httpWisematch.readyState == 4) {
           if (httpWisematch.status==200) {
                  $('community_match_list').innerHTML = httpWisematch.responseText;
                  }
            }
      }
	
	
	
/* AJAX to page through photos */
    var httpPhotos;
      function getPhotos(dir, photoCount)  {
            var start = parseInt($('photos_start').value);
                  start = start - dir;
               if (window.XMLHttpRequest) { // FF, Mozilla, Safari,
                  httpPhotos=new XMLHttpRequest();
                  httpPhotos.onreadystatechange=loadPhotos;
                  httpPhotos.open("GET", "_inc/land/get_photos.aspx?start="+start, true);
                  $("photos_start").value = start;    
                  httpPhotos.send(null);
               } else if (window.ActiveXObject) { //IE
                  httpPhotos=new ActiveXObject('Microsoft.XMLHTTP');
                  if (httpPhotos) {
                     httpPhotos.onreadystatechange=loadPhotos;
                     httpPhotos.open('GET', '_inc/land/get_photos.aspx?start='+start, true);
                     $("photos_start").value = start;
                     httpPhotos.send();
                  }
               }
                var photoPage = '<strong>' + start + '</strong> of ' + photoCount;
			    $("photo_Page").innerHTML = photoPage; 
            }

      function loadPhotos() {
         if (httpPhotos.readyState == 4) {
           if (httpPhotos.status==200) {
                  $('photos_list').innerHTML = httpPhotos.responseText;
                  }
            }
      }
   
	
	
/* AJAX to page through artists */
var httpArtists;
    function getArtists(dir) {
           var start = parseInt($('music_start').value);
              start = start - dir;
           if (window.XMLHttpRequest) { // FF, Mozilla, Safari,
              httpArtists=new XMLHttpRequest();
              httpArtists.onreadystatechange=loadArtists;
              httpArtists.open("GET", "_inc/land/get_artists.aspx?start="+start, true);
              $("music_start").value = start;    
              httpArtists.send(null);
           } else if (window.ActiveXObject) { //IE
              httpArtists=new ActiveXObject('Microsoft.XMLHTTP');
              if (httpArtists) {
                 httpArtists.onreadystatechange=loadArtists;
                 httpArtists.open('GET', '_inc/land/get_artists.aspx?start='+start, true);
                 $("music_start").value = start;
                 httpArtists.send();
              }
           }
        }
      function loadArtists() {
         if (httpArtists.readyState == 4) {
           if (httpArtists.status==200) {
                  $('music_items_list').innerHTML = httpArtists.responseText;
                  }
            }
      }


	

	/* AJAX to page through videos  NEEDS TO BE CONVERETED TO 2.0 ajax (above functions for use in FF)*/
	var httpVideoOne;
	function getVideo_Left(dir) {
		if (navigator.appName == "Microsoft Internet Explorer") {
		  	httpVideoOne = new ActiveXObject("Microsoft.XMLHTTP");
		} else {
			httpVideoOne = new XMLHttpRequest();
		}
		if (httpVideoOne) {
			var start = parseInt($("videoLeft_start").value);
			start = start - dir;
			var url = "_inc/land/get_videoOne.aspx?start="+start;
			httpVideoOne.open("get",url);
			httpVideoOne.onreadystatechange = loadVideoOne;
			httpVideoOne.send(null);
			$("videoLeft_start").value = start;
	   }
	}
	function loadVideoOne() {
	   if (httpVideoOne.readyState == 4) {
		   var response = httpVideoOne.responsetext;
		   $("vid_list_one").innerHTML = response;
		}
	}
	
	
	/* AJAX to page through artists vids (update this!!) */
	var httpVideoTwo;
	function getVideo_Right(dir) {
		if (navigator.appName == "Microsoft Internet Explorer") {
		  	httpVideoTwo = new ActiveXObject("Microsoft.XMLHTTP");
		} else {
			httpVideoTwo = new XMLHttpRequest();
		}
		if (httpVideoTwo) {
			var start = parseInt($("videoRight_start").value);
			start = start - dir;
			var url = "_inc/land/get_VideoTwo.aspx?start="+start;
			httpVideoTwo.open("get",url);
			httpVideoTwo.onreadystatechange = loadVideoTwo;
			httpVideoTwo.send(null);
			$("videoLeft_start").value = start;
	   }
	}
	function loadVideoTwo() {
	   if (httpVideoTwo.readyState == 4) {
		   var response = httpVideoTwo.responsetext;
		   $("vid_list_two").innerHTML = response;
		}
	}

/* lead in image slideshow */
 
var fadeimages=new Array()
fadeimages[0]=["_img/land/lead01.jpg", "/wisematch", ""] 
fadeimages[1]=["_img/land/lead02.jpg", "/marketplace", ""] 
fadeimages[2]=["_img/land/lead03.jpg", "/music", ""] 
fadeimages[3]=["_img/land/lead04.jpg", "/search", ""] 
fadeimages[4]=["_img/land/lead05.jpg", "/music", ""] 

var fadebgcolor="white"
  
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) 
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
    this.pausecheck=pause
    this.mouseovercheck=0
    this.delay=delay
    this.degree=10 //initial opacity degree (10%)
    this.curimageindex=0
    this.nextimageindex=1
    fadearray[fadearray.length]=this
    this.slideshowid=fadearray.length-1
    this.canvasbase="canvas"+this.slideshowid
    this.curcanvas=this.canvasbase+"_0"
    if (typeof displayorder!="undefined")
    theimages.sort(function() {return 0.5 - Math.random();}) 
    this.theimages=theimages
    this.imageborder=parseInt(borderwidth)
    this.postimages=new Array() //preload images
    for (p=0;p<theimages.length;p++){
       this.postimages[p]=new Image()
       this.postimages[p].src=theimages[p][0]
     // document.getElementById('promoLink2').className = "on";
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
    document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
    document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
    this.curimageindex++
    setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
   }
}
function fadepic(obj){
if (obj.degree<100){
    obj.degree+=10
    if (obj.tempobj.filters&&obj.tempobj.filters[0]){
        if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
        obj.tempobj.filters[0].opacity=obj.degree
        else //else if IE5.5-
        obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
    }
    else if (obj.tempobj.style.MozOpacity)
        obj.tempobj.style.MozOpacity=obj.degree/101
    else if (obj.tempobj.style.KhtmlOpacity)
        obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
    clearInterval(fadeclear[obj.slideshowid])
    obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
    obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
    obj.populateslide(obj.tempobj, obj.nextimageindex)
    obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
    setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
  }
}
fadeshow.prototype.populateslide=function(picobj, picindex){
    var slideHTML=""
    if (this.theimages[picindex][1]!="") //if associated link exists for image
    slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
    slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
    if (this.theimages[picindex][1]!="") //if associated link exists for image
    slideHTML+='</a>'
    picobj.innerHTML=slideHTML
}
fadeshow.prototype.rotateimage=function(){
    if (this.pausecheck==1) //if pause onMouseover enabled, cache object
        var cacheobj=this
    if (this.mouseovercheck==1)
        setTimeout(function(){cacheobj.rotateimage()}, 100)
    else if (iebrowser&&dom||dom){
        this.resetit()
        var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
        crossobj.style.zIndex++
        fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
        this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
    }
    else{
        var ns4imgobj=document.images['defaultslide'+this.slideshowid]
        ns4imgobj.src=this.postimages[this.curimageindex].src
    }
    this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
fadeshow.prototype.resetit=function(){
    this.degree=10
    var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
    if (crossobj.filters&&crossobj.filters[0]){
        if (typeof crossobj.filters[0].opacity=="number") //if IE6+
            crossobj.filters(0).opacity=this.degree
        else //else if IE5.5-
            crossobj.style.filter="alpha(opacity="+this.degree+")"
    }
    else if (crossobj.style.MozOpacity)
      crossobj.style.MozOpacity=this.degree/101
    else if (crossobj.style.KhtmlOpacity)
         crossobj.style.KhtmlOpacity=obj.degree/100
} 
fadeshow.prototype.startit=function(){
    var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
    this.populateslide(crossobj, this.curimageindex)
    if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
        var cacheobj=this
        var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
        crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
        crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
    }
    this.rotateimage()
}
 