function popupAddCartWindow(url) {
	
	var width = 180;
	var height = 130;
	
	if(window.innerWidth){
		LeftPosition =(window.innerWidth-width)/2;
		TopPosition =((window.innerHeight-height)/4)-50;
	}else{
		LeftPosition =(parseInt(window.screen.width)- width)/2;
		TopPosition=((parseInt(window.screen.height)-height)/2)-50;	
	}
		
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=180,height=130,screenX=150,screenY=150,top= ' + TopPosition + ',left=' + LeftPosition + '')
  return false;
}


function popupProductWindow(url) {
	
	var width = 780;
	var height = 600;
	
	if(window.innerWidth){
		LeftPosition =(window.innerWidth-width)/2;
		TopPosition =((window.innerHeight-height)/4)-50;
	}else{
		LeftPosition =(parseInt(window.screen.width)- width)/2;
		TopPosition=((parseInt(window.screen.height)-height)/2)-50;	
	}
		
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width= ' + width + ',' + ' height= ' + height + ',screenX=100,screenY=100,top= ' + TopPosition + ',left=' + LeftPosition + '')
  return false;
}

function centerPopup(obj, width, height, resize){
	if (resize){
		window.resizeTo(width, height);
	}
	
	/*if(window.innerWidth){
		LeftPosition =(window.innerWidth-width)/2;
		TopPosition =((window.innerHeight-height)/2)-50;
		alert('here'+LeftPosition);
	}else{
	*/
		LeftPosition =(parseInt(window.screen.width)- width)/2;
		TopPosition=((parseInt(window.screen.height)-height)/2)-50;					
//	}
	
	window.moveTo( LeftPosition , TopPosition );
	
	return false;
}
