// JavaScript Document www.MomInnovations.com
// CustField - Larger View - PROD Screen

//--------------------------------<!-- Product Larger View -->----------------------------------------------------------------------

<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields:imgheight">
var height= &mvt:product:customfield_values:customfields:imgheight;;
<mvt:else>
var height=700;
</mvt:if>
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields:imgwidth">
var width= &mvt:product:customfield_values:customfields:imgwidth;;
<mvt:else>
var width=650;
</mvt:if>
var opts="width="+width+", height="+height+", resizable=yes";

function showLarge(){
var winImage = window.open( '&mvt:global:sessionurl;Screen=POPUP&Product_Code=&mvte:product:code;&Store_Code=&mvte:store:code;','newWindow',opts);
//--------------------------<!-- Continue Product Larger View Script-->------------------------------------------------------------------
var i=0;
function resize() {

var imageId = document.images[0].id ;

if ( "popUpImg" == imageId )
{

  if (navigator.appName == 'Netscape'){
  	i=40;
  } else  {
  	i=0;
  }
    
  if (document.images[0]) {
  	window.resizeTo(document.images[0].width +50, document.images[0].height + 185 -i);
  }	
  self.focus();
}

}

function NewWindow(mypage,myname,w,h,scrol,image){

        LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		LeftPosition = 50;

        TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		TopPosition = 50;

		
        settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrol+' ';//,resizable , toolBar

        win = window.open(mypage,myname,settings);
}
