﻿function disableSelection(target){
		if (typeof target.onselectstart!="undefined")
			target.onselectstart=function(){return false}
		else if (typeof target.style.MozUserSelect!="undefined")
			target.style.MozUserSelect="none"
		else //All other route (ie: Opera)
			target.onmousedown=function(){return false}
		target.style.cursor = "default"
}

function addone() {
document.getElementById('QUANTITY').value = parseFloat(document.getElementById('QUANTITY').value) + 1;
if (document.getElementById('QUANTITY').value < 0)
{
document.getElementById('QUANTITY').value = 1
//alert("Whoops! Quantity can not be negative. \n\nPlease enter a positive number!\nThank You.");
}
}

function subtractone() {
document.getElementById('QUANTITY').value = document.getElementById('QUANTITY').value - 1;
if (document.getElementById('QUANTITY').value < 0)
{
document.getElementById('QUANTITY').value = 1
//alert("Whoops! Quantity can not be negative. \n\nPlease enter a positive number!\nThank You.");
}
}

function roll_over(img_name, img_src) {
document[img_name].src = img_src;
}

var bo_ns_id = 0;
function startIeFix(){
  if(isIE()){
      document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');
        }
}
function endIeFix(){
  if(isIE()){
      document.write('</div>');
          var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);
          var theCode = theObject.innerHTML;
          theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))
          document.write(theCode);
  }
}
function isIE(){
  var strBrwsr= navigator.userAgent.toLowerCase();
  if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){
	  if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){
	  return false;
	  }
	  if(strBrwsr.indexOf("win98") > -1 ||
		  strBrwsr.indexOf("win 9x 4.90") > -1 ||
		  strBrwsr.indexOf("winnt4.0") > -1 ||
		  strBrwsr.indexOf("windows nt 5.0") > -1)    {
		  return false;
	  }
	  	return true;
	  }
	  else{
	  	return false;
  }
}

function CreateBookmarkLink() {

 title = "Small Cute Gifts .com"; 
 url = "http://smallcutegifts.com";

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 } 