var alldivs = [];
var curspn_show = 'tabb2';
var curspn_childshow = 0;
var alluls = ['tabb2','tabb3','tabb4','tabb5'];
var allts = ['t2','t3','t4','t5'];
var alldivs = [];
var curdivshow = '';


if (window.addEventListener) {
   document.addEventListener('mouseover', MouseOutExe,false);
   window.addEventListener("load", initializemarquee, false);
}
else if (window.attachEvent) {
  document.attachEvent('onmouseover', MouseOutExe);
  window.attachEvent("onload", initializemarquee);
}
else if ($) {
  window.onload = MouseOutExe;
  window.onload = initializemarquee;
}



function MouseOutExe(e) {
  e = Event.element(e);
  if ( (e.id == 'spn_logo_options') || (e.parentNode.id == 'spn_logo_poped') || (e.id == 'spn_logo_poped') || (e.parentNode.id == 'more_gadgets')  ) {
	 if (!$('spn_logo_poped') &&  !$('sendtofrnd') ) {
	   // get the gadgets id
	   var urll = location.href.split('=');
	   gid = urll[1];
	   // get the spn logo position
	   var spnpos = Position.cumulativeOffset($('spn_logo_options'));
	   p = document.createElement('div');
	   p.id = 'spn_logo_poped';
	   p.className = 'spn_logo_class';
	   Element.setStyle(p,{zIndex:1000,position:'absolute',top:spnpos[1]- 45+'px',left:spnpos[0]-53+'px',display:'none'});
	   var rexp = new RegExp("import-ajax","g");
       if (location.href.match(rexp))  {  // check it that from where the request coming in either from own site or from another
	      p.innerHTML = '<div id="more_gadgets" style="border-bottom:1px solid #4B6971;cursor:pointer;text-align:left;padding-left:2px;color:#2B8CB4;height:15px;" onmouseover="javascript:$(\'more_gadgets\').style.backgroundColor=\'#98DEFD\';" onmouseout="javascript:$(\'more_gadgets\').style.backgroundColor=\'#FEFEFE\';"><a href="http://www.smartwebgadgets.com/get-gadgets.php?id='+gid+'" target="_blank" style="color:#2B8CB4; text-decoration:none;"><img src="http://www.smartwebgadgets.com/gad_image/circle.gif" border="0" />&nbsp;Add to My Site</a></div><div id="sendtofriend" style="border-bottom:1px solid #4B6971;cursor:pointer;text-align:left;padding-left:2px;;color:#2B8CB4;height:15px;" onclick="javascript:send_to_frnd('+gid+'); return false;" onmouseover="javascript:$(\'sendtofriend\').style.backgroundColor=\'#98DEFD\';" onmouseout="javascript:$(\'sendtofriend\').style.backgroundColor=\'#FEFEFE\';"><img src="http://www.smartwebgadgets.com/gad_image/sndfrnd.gif" border="0" >&nbsp;Send to Friend</div><div id="help" style="cursor:pointer;text-align:left;padding-left:2px;;color:#2B8CB4;height:15px;" onmouseover="javascript:$(\'help\').style.backgroundColor=\'#98DEFD\';" onmouseout="javascript:$(\'help\').style.backgroundColor=\'#FEFEFE\';"><a href="http://www.smartwebgadgets.com/get-gadgets.php?id='+gid+'" target="_blank" style="color:#2B8CB4; text-decoration:none;"><img src="http://www.smartwebgadgets.com/gad_image/question.gif" border="0" >&nbsp;Help</a></div>'; 
	   }
	   else { 
	      p.innerHTML = '<div id="more_gadgets" style="border-bottom:1px solid #4B6971;cursor:pointer;text-align:left;padding-left:2px;color:#2B8CB4;height:15px;" onmouseover="javascript:$(\'more_gadgets\').style.backgroundColor=\'#98DEFD\';" onmouseout="javascript:$(\'more_gadgets\').style.backgroundColor=\'#FEFEFE\';" onclick="javascript:get_gadgets('+gid+'); return false;"><img src="http://www.smartwebgadgets.com/gad_image/circle.gif" border="0" />&nbsp;Add to My Site</div><div id="sendtofriend" style="border-bottom:1px solid #4B6971;cursor:pointer;text-align:left;padding-left:2px;;color:#2B8CB4;height:15px;" onclick="javascript:send_to_frnd('+gid+'); return false;" onmouseover="javascript:$(\'sendtofriend\').style.backgroundColor=\'#98DEFD\';" onmouseout="javascript:$(\'sendtofriend\').style.backgroundColor=\'#FEFEFE\';"><img src="http://www.smartwebgadgets.com/gad_image/sndfrnd.gif" border="0" >&nbsp;Send to Friend</div><div id="help" style="cursor:pointer;text-align:left;padding-left:2px;;color:#2B8CB4;height:15px;" onmouseover="javascript:$(\'help\').style.backgroundColor=\'#98DEFD\';" onmouseout="javascript:$(\'help\').style.backgroundColor=\'#FEFEFE\';" onclick="javascript:get_gadgets('+gid+'); return false;"><img src="http://www.smartwebgadgets.com/gad_image/question.gif" border="0" >&nbsp;Help</div>';
	   }
		
		document.body.appendChild(p);
	    new Effect.toggle('spn_logo_poped','appear',{duration:0.5});
	 }
  }
  else { 
	 if ($('spn_logo_poped') ) 
	   new Effect.toggle('spn_logo_poped','appear',{duration:0.5,afterFinishInternal:function(){$('spn_logo_poped').remove();}});
	   //$('spn_logo_poped').remove();
  }
} // end function



function showMoreOpt() {
  $('playingNow').style.display = 'none';
  $('showTh').style.display = 'none';
  $('showMore').style.display = 'block';
 	
}
function showThumb(id) {
  if (id == 8) {
	  $('playingNow').style.display = 'block';
	  $('showTh').style.display = 'none';
	  $('showMore').style.display = 'none';
	  return 1;
  }
  $('showMore').style.display = 'none';
  $('showTh').style.display = 'block';
  for(i=1;i<8;i++) { $('imgD'+i).style.display = 'none'; }
  $('imgD'+id).style.display = 'block';
  
}
function playVideo(key) {
  $('playingNow').style.display = 'block';
  $('showTh').style.display = 'none';
  $('showMore').style.display = 'none';
  $('playingNow').innerHTML = '<object id="player" width="217" height="200" align="middle" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="false" name="allowFullScreen"/><param value="sameDomain" name="allowScriptAccess"/><param id="movieName" value="http://videos.sitepronews.com/player/vPlayer.swf?f=http://videos.sitepronews.com/player/vConfig_embed.php?vkey='+key+'" name="movie"/><param value="high" name="quality"/><param value="#000000" name="bgcolor"/><param name="autoPlay" value="false" /><param name="controller" value="false" /><embed width="217" class="dummy" height="200" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" allowfullscreen="false" bgcolor="#000000" quality="high"  controller="false" src="http://videos.sitepronews.com/player/vPlayer.swf?f=http://videos.sitepronews.com/player/vConfig_embed.php?vkey='+key+'" autoPlay="false" /></object>';
}


