function showHide(shID) {
  if (document.getElementById(shID)) {
    if (document.getElementById(shID).style.display != 'none') {
      document.getElementById(shID).style.display = 'none';
      linkText = document.getElementById(shID+'-show').innerHTML;
      linkText = " [+]" + linkText.substr(4);
      document.getElementById(shID+'-show').innerHTML = linkText;
    } else {
      document.getElementById(shID).style.display = 'block';
      linkText = document.getElementById(shID+'-show').innerHTML;
      linkText = " [-]" + linkText.substr(4);
      document.getElementById(shID+'-show').innerHTML = linkText;	  
    }
  }
}
function ch_livehelp() {
  window.open('/chat.html', 'display', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
}  //http://www.365webcall.com/chat/ChatWin.aspx?settings=mw7mmXPmbX0N6z3A7Pb6z3AwwN66mmb0&LL=1
function buy_return() {
  window.open('/s-Shipping and Returning.html', 'display', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
}
function ch_during() {
  window.open('/s-Customer%20Service.html', 'display', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
}
function buy_secure() {
  window.open('/s-Secure Purchase Guarantee.html', 'display', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
}  
function buy_replace() {
 window.open('/s-replaceable.html', 'open', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
} 
function pro_size() {
  window.open('/s-size exchange.html', 'open', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
}   
function pro_freeship() {
  window.open('/s-Shipping and Returning.html', 'open', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
}
function pro_box() {
  window.open('/s-original box card.html', 'open', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
}  
function buy_help() {
  window.open('/s-Ordering Instructions.html', 'open', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
}  
function buy_policy() {
  window.open('/s-Privacy Policy.html', 'open', 'left=20,top=20,scrollbars=yes,resizable=yes,width=660,height=500');
}  



var tooltip=function(){
	var id = 'tt';
	var top = 3;
	var left = 3;
	var maxw = 250;
	var speed = 1000;
	var timer = 20;
	var endalpha = 95;
	var alpha = 0;
	var tt,t,c,b,h;
	var ie = document.all ? true : false;
	return{
		show:function(v,w){
			if(tt == null){
				tt = document.createElement('div');
				tt.setAttribute('id',id);
				t = document.createElement('div');
				t.setAttribute('id',id + 'top');
				c = document.createElement('div');
				c.setAttribute('id',id + 'cont');
				b = document.createElement('div');
				b.setAttribute('id',id + 'bot');
				tt.appendChild(t);
				tt.appendChild(c);
				tt.appendChild(b);
				document.body.appendChild(tt);
				tt.style.opacity = 0;
				tt.style.filter = 'alpha(opacity=0)';
				document.onmousemove = this.pos;
			}
			tt.style.display = 'block';
			c.innerHTML = v;
			tt.style.width = w ? w + 'px' : 'auto';
			if(!w && ie){
				t.style.display = 'none';
				b.style.display = 'none';
				tt.style.width = tt.offsetWidth;
				t.style.display = 'block';
				b.style.display = 'block';
			}
			if(tt.offsetWidth > maxw){tt.style.width = maxw + 'px'}
			h = parseInt(tt.offsetHeight) + top;
			clearInterval(tt.timer);
			tt.timer = setInterval(function(){tooltip.fade(1)},timer);
		},
		pos:function(e){
			var u = ie ? event.clientY + document.documentElement.scrollTop : e.pageY;
			var l = ie ? event.clientX + document.documentElement.scrollLeft : e.pageX;
			tt.style.top = (u - h) + 'px';
			tt.style.left = (l + left) + 'px';
		},
		fade:function(d){
			var a = alpha;
			if((a != endalpha && d == 1) || (a != 0 && d == -1)){
				var i = speed;
				if(endalpha - a < speed && d == 1){
					i = endalpha - a;
				}else if(alpha < speed && d == -1){
					i = a;
				}
				alpha = a + (i * d);
				tt.style.opacity = alpha * .01;
				tt.style.filter = 'alpha(opacity=' + alpha + ')';
			}else{
				clearInterval(tt.timer);
				if(d == -1){tt.style.display = 'none'}
			}
		},
		hide:function(){
			clearInterval(tt.timer);
			tt.timer = setInterval(function(){tooltip.fade(-1)},timer);
		}
	};
}();


function checkmail()
{
if(document.femail.addemail.value.length!=0)
{
if (document.femail.addemail.value.charAt(0)=="." ||        
	 document.femail.addemail.value.charAt(0)=="@" ||      
	 document.femail.addemail.value.indexOf('@', 0) == -1 ||
	 document.femail.addemail.value.indexOf('.', 0) == -1 ||
	 document.femail.addemail.value.lastIndexOf("@")==document.femail.addemail.value.length-1 || 
	 document.femail.addemail.value.lastIndexOf(".")==document.femail.addemail.value.length-1)
 {
  alert("Email Address Not Correct!");
  document.femail.addemail.focus();
  return false;
  }
}
else
{
alert("Email Is Empty!");
document.femail.addemail.focus();
return false;
}
}

