// JavaScript Document
function addBookmark() {
    var BookmarkURL="http://www.diamondsexshop.hu";
    var BookmarkTitle="Diamond Sexshop";
    // If the browser is Internet Explorer
    if (document.all)  {
        window.external.AddFavorite(BookmarkURL,BookmarkTitle)
	}
    else {
		window.sidebar.addPanel(BookmarkTitle, BookmarkURL, '');
    }
}
function add(theLink, azonosito) {
	var type = document.getElementsByName(azonosito);    
	for (var i=0; i < type.length; i++)  {
		if (type[i].checked)  {
			var rad_val = type[i].value;
        }
    }	
	theLink.href += '&type='+rad_val;
    return true;
}

function noImg(obj) {
	obj.src='no_image.gif';
}

function setCookie(name, value, expire) {
  document.cookie = name + "=" + escape(value)
    + ((expire == null) ? "" : ("; path=/ ;expires=" + expire.toGMTString()))
}

function getCookie(Name){
  var search = Name + "=";
  if (document.cookie.length > 0){
      offset = document.cookie.indexOf(search);
      if (offset != -1){
         offset += search.length;
         end = document.cookie.indexOf(";", offset);
         if (end == -1) end = document.cookie.length;
            return unescape(document.cookie.substring(offset, end));
      }
  }
}

function over18_check()
{
d = new Date();
d.setTime( d.getTime() + (60*24*60*60*1000) );

setCookie('testcookie', 'true', d);
var testcookie2=getCookie('testcookie');
var over18check=getCookie('over18check');

    if ((testcookie2=='true') && (over18check!='checked'))
    {    
	location.replace('belepes.php');
    }
}

function ujablak(url,name,w,h){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  window.open(url,name,'top='+wint+',left='+winl+',width='+w+',height='+h+', scrollbars=2' );
}

$(function(){

      $("#myScroll").mbScrollable({
        width:770,
        elementsInPage:1,
        elementMargin:2,
        shadow:"#999 2px 2px 2px",
        height:25,
        slideTimer:1000,
        autoscroll:true,
        scrollTimer:2500
      });


      //setTimeout(function(){$("#wrapper").fadeIn();},2000);
});
