// PopIt will popup a window with various attributes // Enter code in the following way // PopIt('HTML FILE TO BE OPENED.html',WIDTH,HEIGHT,CENTERX,CENTERY) // HTML FILE TO BE OPENED is a needed variable // WIDTH,HEIGHT,CENTERX,CENTERY are not nessessary var newwindow = ''; var idName; function PopIt(url,target_name,w,h,cx,cy,show_toolbar,show_menubar){ width=w||"0"; height=h||"0"; toolbar=show_toolbar||"0"; menubar=show_menubar||"0"; topPosition=cy||"0"; leftPosition=cx||"0"; screenWidth=screen.width; screenHeight=screen.height; if (width=="0") { width="640"; } if (height=="0") { height="500"; } if (leftPosition=="0") { if (width > screenWidth) { width= screenWidth; leftPosition=0; } else { leftPosition=(screenWidth-width)/2; } } if (topPosition=="0") { if (height > screenHeight) { height= screenHeight; topPosition=0; } else { topPosition=(screenHeight-height)/2; } } openParam = "toolbar="+toolbar+",location=0,status=0,menubar="+menubar+",scrollbars=yes,copyhistory=0,resizable=1,alwaysRaised,titlebar=0,width="+width+",height="+height+",top="+topPosition+",left="+leftPosition; if (!newwindow.closed && newwindow.location){ newwindow.location.href = url; } else { newwindow=window.open(url, target_name, openParam); if (!newwindow.opener) newwindow.opener = self; } if (window.focus) { newwindow.focus() } return false; } // Enter code in the following way // PopItTopRight('HTML FILE TO BE OPENED.html',WIDTH,HEIGHT,CENTERX,CENTERY) // HTML FILE TO BE OPENED is a needed variable // WIDTH,HEIGHT,CENTERX,CENTERY are not nessessary function PopItTopRight(url,target_name,w,h,cx,cy,show_toolbar,show_menubar){ width=w||"0"; height=h||"0"; toolbar=show_toolbar||"0"; menubar=show_menubar||"0"; topPosition=cy||"0"; leftPosition=cx||"0"; screenWidth=screen.width; screenHeight=screen.height; topRightSub(url,target_name,width,height,toolbar,menubar,topPosition,leftPosition,screenWidth,screenHeight); return false; } // Enter code in the following way // PopItTopRight('HTML FILE TO BE OPENED.html',WIDTH,HEIGHT,CENTERX,CENTERY) // HTML FILE TO BE OPENED is a needed variable // WIDTH,HEIGHT,CENTERX,CENTERY are not nessessary function PopItTopRightBusiness(url,target_name,w,h,idName,cx,cy,show_toolbar,show_menubar){ width=w||"0"; height=h||"0"; toolbar=show_toolbar||"0"; menubar=show_menubar||"0"; topPosition="0"; leftPosition="0"; screenWidth=screen.width; screenHeight=screen.height; idSal= document.getElementById("saleStyleId").value; if (idName=="sale" && (idSal!=null && idSal!="")) { url = url + "?idName=" + idSal; } else if (document.getElementById("referStyleId") != null) { idRef = document.getElementById("referStyleId").value; if (idRef != "") url = url + "?idName=" + idRef; } topRightSub(url,target_name,width,height,toolbar,menubar,topPosition,leftPosition,screenWidth,screenHeight); return false; } function PopItTopRightOrder(url,target_name,w,h,cx,cy,show_toolbar,show_menubar){ width=w||"0"; height=h||"0"; toolbar=show_toolbar||"0"; menubar=show_menubar||"0"; topPosition="0"; leftPosition="0"; screenWidth=screen.width; screenHeight=screen.height; idOrder= document.getElementById("orderStyleId").value; if(idOrder!=null && idOrder!=""){ url=url+"?idName="+idOrder; } topRightSub(url,target_name,width,height,toolbar,menubar,topPosition,leftPosition,screenWidth,screenHeight); return false; } function topRightSub(url,target_name,width,height,toolbar,menubar,topPosition,leftPosition,screenWidth,screenHeight){ if (width=="0") { width="640"; } if (height=="0") { height="500"; } if (leftPosition=="0") { if (width > screenWidth) { width= screenWidth; leftPosition=0; } else { leftPosition=(screenWidth-width-20); } } if (topPosition=="0") { if (height > screenHeight) { height= screenHeight; topPosition=0; } else { topPosition=10; } } openParam = "toolbar="+toolbar+",location=0,status=0,menubar="+menubar+",scrollbars=yes,copyhistory=0,resizable=1,alwaysRaised,titlebar=0,width="+width+",height="+height+",top="+topPosition+",left="+leftPosition; if (!newwindow.closed && newwindow.location){ newwindow.location.href = url; } else { newwindow=window.open(url, target_name, openParam); if (!newwindow.opener) newwindow.opener = self; } if (window.focus) { newwindow.focus() } }