function previewImage(imgPath,modelName){ width = 600; 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; } attr = 'resizable=no,scrollbars=no,width=' + width + ',height=' + height + ',screenX=500,screenY=500,left=' + LeftPosition + ',top=' + TopPosition + ''; popWin=open('', 'new_window', attr); popWin.document.write('