﻿//! ################################################################
//! This code is Copyright of (c) 2006 www.am2pmdeals.com
//! All Rights Reserved.
//! Not to be reused.
//! Secret component is tracking, If you copy the code.
//! ################################################################

// JScript File
function addbookmark()
{
bookmarkurl="http://www.am2pmdeals.com/"
bookmarktitle="Smart Deals for Smart People - Best Deals Website"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function PastDealsSubmit()
{
document.gpastdeals.MenuVar.value = document.Form1.pastdeals.value;
//alert(document.gpastdeals.MenuVar.value);
document.gpastdeals.submit();
}

function displayCalendar()
        {
            var datePicker = document.getElementById('datePicker');
            datePicker.style.display = 'block';
        }
 
function popUp(url)
	{
		sealWin=window.open(url,'newwindow','toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,height=300,width=1000');
		self.name = "mainWin";
	}
	
function modelesswin(url,mwidth,mheight)
{
if (document.all&&window.print) //if ie5
eval('window.showModelessDialog(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
else
eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}

function modelesswinN(URL,mwidth,mheight) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width='+mwidth+'px,height='+mheight+'px,left = 0,top = 0');");
}




function CloseThisWindow()
{
window.close();
}

function ProductpopUp(url)
	{
		sealWin=window.open(url,'newwindow','toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,height=450,width=550');
		self.name = "mainWin";
	}

function ChangeToUpper(theElement){
theElement.value = theElement.value.toUpperCase();
}
function displayCalendar()
{
var datePicker = document.getElementById('datePicker');
datePicker.style.display = 'block';
}
function displayCalendar1()
{
var datePicker1 = document.getElementById('datePicker1');
datePicker1.style.display = 'block';
}
function displayCalendarmp()
{
//alert('HELLO');
var datePickermp = document.getElementById('datePickermp');
//alert(datePickermp);
datePickermp.style.display = 'block';
}

function mp1displayCalendar()
            {
            var datePickermp1 = document.getElementById('datePickermp1');
            datePickermp1.style.display = 'block';
            }

function mp2displayCalendar()
            {
            var datePickermp2 = document.getElementById('datePickermp2');
            datePickermp2.style.display = 'block';
            }
function mp3displayCalendar()
            {
            var datePickermp3 = document.getElementById('datePickermp3');
            datePickermp3.style.display = 'block';
            }
function mp4displayCalendar()
            {
            var datePickermp4 = document.getElementById('datePickermp4');
            datePickermp4.style.display = 'block';
            }
 function mp5displayCalendar()
            {
            var datePickermp5 = document.getElementById('datePickermp5');
            datePickermp5.style.display = 'block';
            }                       
function mp6displayCalendar()
            {
            var datePickermp6 = document.getElementById('datePickermp6');
            datePickermp6.style.display = 'block';
            } 
function mp7displayCalendar()
            {
            var datePickermp7 = document.getElementById('datePickermp7');
            datePickermp7.style.display = 'block';
            }            
 function mp8displayCalendar()
            {
            var datePickermp8 = document.getElementById('datePickermp8');
            datePickermp8.style.display = 'block';
            }          
  function mp9displayCalendar()
            {
            var datePickermp9 = document.getElementById('datePickermp9');
            datePickermp9.style.display = 'block';
            } 
  function mp10displayCalendar()
            {
            var datePickermp10 = document.getElementById('datePickermp10');
            datePickermp10.style.display = 'block';
            }              
function photoShow() {
  
  if (document.Form4.imageurl.value=="")
  {
			alert("Please Enter Image Url !")
			document.Form4.imageurl.focus();
			return;
  }
		else
		
  {	
			URL = document.Form4.imageurl.value;       
		    eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function photoShow1() {
  
  if (document.Form4.navigateurl.value=="")
  {
			alert("Please Enter Url !")
			document.Form4.navigateurl.focus();
			return;
  }
		else
		
  {	
			URL = document.Form4.navigateurl.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function MultiLink1()
{
if (document.Formmulti.mpl1.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl1.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl1.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}

function MultiLink2()
{
if (document.Formmulti.mpl2.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl2.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl2.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}

function MultiLink3()
{
if (document.Formmulti.mpl3.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl3.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl3.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}

function MultiLink4()
{
if (document.Formmulti.mpl4.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl4.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl4.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}


function MultiLink5()
{
if (document.Formmulti.mpl5.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl5.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl5.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}

function MultiLink6()
{
if (document.Formmulti.mpl6.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl6.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl6.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}

function MultiLink7()
{
if (document.Formmulti.mpl7.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl7.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl7.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}

function MultiLink8()
{
if (document.Formmulti.mpl8.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl8.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl8.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}

function MultiLink9()
{
if (document.Formmulti.mpl9.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl9.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl9.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}

function MultiLink10()
{
if (document.Formmulti.mpl10.value=="")
  {
			alert("Please Enter URL !")
			document.Formmulti.mpl10.focus();
			return;
  }
		else
		
  {	
			URL = document.Formmulti.mpl10.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
}

function photoShow3() {
  
 
  if (document.Form3.PROD_OWNER_link.value=="")
  {
			alert("Please Enter Url !")
			document.Form3.PROD_OWNER_link.focus();
			return;
  }
		else
		
  {	
			URL = document.Form3.PROD_OWNER_link.value;		    
		    eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");
	}
  
}

function photoShow4() {
  
 
  if (document.Form3.IMG_URL.value=="")
  {
			alert("Please Enter Url !")
			document.Form3.IMG_URL.focus();
			return;
  }
		else
		
  {	
			URL = document.Form3.IMG_URL.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function photoShow5() {
  

  if (document.Form3.frmProducts$txtimg_url.value=="")
  {
			alert("Please Enter Url !")
			document.Form3.frmProducts$txtimg_url.focus();
			return;
  }
		else
		
  {	
			URL = document.Form3.frmProducts$txtimg_url.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function BF1() {
  

  if (document.Form15.IMG1_URLMP.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.IMG1_URLMP.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.IMG1_URLMP.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function BF2() {
  

  if (document.Form15.IMG2_URLMP.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.IMG2_URLMP.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.IMG2_URLMP.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function BF3() {
  

  if (document.Form15.IMG3_URLMP.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.IMG3_URLMP.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.IMG3_URLMP.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL1() {
  

  if (document.Form15.PROD_linkMP1.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP1.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP1.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL2() {
  

  if (document.Form15.PROD_linkMP2.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP2.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP2.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL3() {
  

  if (document.Form15.PROD_linkMP3.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP3.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP3.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL4() {
  

  if (document.Form15.PROD_linkMP4.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP4.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP4.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL5() {
  

  if (document.Form15.PROD_linkMP5.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP5.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP5.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL6() {
  

  if (document.Form15.PROD_linkMP6.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP6.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP6.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL7() {
  

  if (document.Form15.PROD_linkMP7.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP7.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP7.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL8() {
  

  if (document.Form15.PROD_linkMP8.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP8.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP8.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL9() {
  

  if (document.Form15.PROD_linkMP9.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP9.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP9.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL10() {
  

  if (document.Form15.PROD_linkMP10.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP10.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP10.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL11() {
  

  if (document.Form15.PROD_linkMP11.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP11.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP11.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL12() {
  

  if (document.Form15.PROD_linkMP12.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP12.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP12.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL13() {
  

  if (document.Form15.PROD_linkMP13.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP13.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP13.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL14() {
  

  if (document.Form15.PROD_linkMP14.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP14.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP14.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL15() {
  

  if (document.Form15.PROD_linkMP15.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP15.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP15.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL16() {
  

  if (document.Form15.PROD_linkMP16.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP16.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP16.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL17() {
  

  if (document.Form15.PROD_linkMP17.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP17.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP17.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL18() {
  

  if (document.Form15.PROD_linkMP18.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP18.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP18.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL19() {
  

  if (document.Form15.PROD_linkMP19.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP19.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP19.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL20() {
  

  if (document.Form15.PROD_linkMP20.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP20.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP20.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL21() {
  

  if (document.Form15.PROD_linkMP21.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP21.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP21.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL22() {
  

  if (document.Form15.PROD_linkMP22.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP22.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP22.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}
function PL23() {
  

  if (document.Form15.PROD_linkMP23.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP23.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP23.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL24() {
  

  if (document.Form15.PROD_linkMP24.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP24.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP24.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function PL25() {
  

  if (document.Form15.PROD_linkMP25.value=="")
  {
			alert("Please Enter Url !")
			document.Form15.PROD_linkMP25.focus();
			return;
  }
		else
		
  {	
			URL = document.Form15.PROD_linkMP25.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");


	}
  
}

function CheckLinka() {
  
if (document.Form9.ACcoupon_link.value=="")
  {
			alert("Please Enter Url !")
			document.Form9.ACcoupon_link.focus();
			return;
  }
		else
		
  {	
			URL = document.Form9.ACcoupon_link.value;       
		   eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=850,height=550,left = 0,top = 0');");


	}
  
}

function NoCouponCode()
{
document.Form9.ACcoupon_code.value = 'NO Coupon Code'
}


function photoShow6() {
  
 
  if (document.Form3.frmProducts$txtPROD_OWNER_link.value=="")
  {
			alert("Please Enter Url !")
			document.Form3.frmProducts$txtPROD_OWNER_link.focus();
			return;
  }
		else
		
  {	
			URL = document.Form3.frmProducts$txtPROD_OWNER_link.value;		    
		    eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");
	}
  
}

if(document.getElementById) {
	var upLevel = true;
	}
else if(document.layers) {
	var ns4 = true;
	}
else if(document.all) {
	var ie4 = true;
	}
else if(document.all) {
	var ff = true;
	}
else if(document.all) {
	var firefox = true;
	}
function showObject(obj) {
	if (ns4) obj.visibility = "show";
	else if (ie4 || upLevel) obj.style.visibility = "visible";
	}
function hideObject(obj) {
	if (ns4) {
		obj.visibility = "hide";
		}
	if (ie4 || upLevel) {
		obj.style.visibility = "hidden";
		}
	if (ns4 || upLevel) {
		obj.style.visibility = "hidden";
		}
	
	if (ff || upLevel) {
		obj.style.visibility = "hidden";
		}
	if (firefox || upLevel) {
		obj.style.visibility = "hidden";
		}
	}
	
	
function photoShowpc1() {
  
 
  if (document.Form3.compare_searchdesc.value=="")
  {
			alert("Please Enter Url !")
			document.Form3.compare_searchdesc.focus();
			return;
  }
		else
		
  {	
			URL = "http://www.pricegrabber.com/search.php?topcat_search=1&form_keyword=" + document.Form3.compare_searchdesc.value;		    
		    eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");
	}
  
}	

function photoShowpc2() {
  
 
  if (document.Form3.frmProducts$txtcompare_searchdesc.value=="")
  {
			alert("Please Enter Url !")
			document.Form3.frmProducts$txtcompare_searchdesc.focus();
			return;
  }
		else
		
  {	
			URL = "http://www.pricegrabber.com/search.php?topcat_search=1&form_keyword=" + document.Form3.frmProducts$txtcompare_searchdesc.value;		    
		    eval("page" + " = window.open(URL, '" + "', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=750,height=550');");
	}
  
}	

function FreeShipping()
{
document.Form3.PROD_DESC3.value = document.Form3.PROD_DESC3.value+ '  Free Shipping. ';
return;
}

function ok(maxchars,textboxvar)
{
 
 if (textboxvar =='D1')
 {
     if(document.Form3.PROD_DESC1.value.length > maxchars) 
     {
           alert('Too much data in the text box Product Description1 ! Please remove '+
            (document.Form3.PROD_DESC1.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC1.focus();
           return false; 
     }
 }
 
 if (textboxvar =='D2')
 {
     if(document.Form3.PROD_DESC2.value.length > maxchars) 
     {
           alert('Too much data in the text box  Product Description2! Please remove '+
            (document.Form3.PROD_DESC2.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC2.focus();
           return false; 
     }
 }
 
 if (textboxvar =='D3')
 {
     if(document.Form3.PROD_DESC3.value.length > maxchars) 
     {
           alert('Too much data in the text box   Product Description3  ! Please remove '+
            (document.Form3.PROD_DESC3.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC3.focus();
           return false; 
     }
 }
 
 if (textboxvar =='D4')
 {
     if(document.Form3.PROD_DESC4.value.length > maxchars) 
     {
           alert('Too much data in the text box Product Description4  ! Please remove '+
            (document.Form3.PROD_DESC4.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC4.focus();
           return false; 
     }
 }
 
 if (textboxvar =='D5')
 {
     if(document.Form3.PROD_DESC5.value.length > maxchars) 
     {
           alert('Too much data in the text box  Product Description5 ! Please remove '+
            (document.Form3.PROD_DESC5.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC5.focus();
           return false; 
     }
 }
 
 if (textboxvar =='D6')
 {
     if(document.Form3.PROD_DESC6.value.length > maxchars) 
     {
           alert('Too much data in the text box  Product Description6 ! Please remove '+
            (document.Form3.PROD_DESC6.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC6.focus();
           return false; 
     }
 }
 
 if (textboxvar =='D7')
 {
     if(document.Form3.PROD_DESC7.value.length > maxchars) 
     {
           alert('Too much data in the text box Product Description7  ! Please remove '+
            (document.Form3.PROD_DESC7.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC7.focus();
           return false; 
     }
 }
 
 if (textboxvar =='D8')
 {
     if(document.Form3.PROD_DESC8.value.length > maxchars) 
     {
           alert('Too much data in the text box  Product Description8 ! Please remove '+
            (document.Form3.PROD_DESC8.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC8.focus();
           return false; 
     }
 }
 
 if (textboxvar =='D9')
 {
     if(document.Form3.PROD_DESC9.value.length > maxchars) 
     {
           alert('Too much data in the text box Product Description9  ! Please remove '+
            (document.Form3.PROD_DESC9.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC9.focus();
           return false; 
     }
 }
 
 if (textboxvar =='D10')
 {
     if(document.Form3.PROD_DESC10.value.length > maxchars) 
     {
           alert('Too much data in the text box  Product Description10 ! Please remove '+
            (document.Form3.PROD_DESC10.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC10.focus();
           return false; 
     }
 }
 
 if (textboxvar =='DL')
 {
     if(document.Form3.PROD_DESC_LONG.value.length > maxchars) 
     {
           alert('Too much data in the text box  Product Description Long ! Please remove '+
            (document.Form3.PROD_DESC_LONG.value.length - maxchars)+ ' characters');
            document.Form3.PROD_DESC_LONG.focus();
           return false; 
     }
 }
 
 
 
 else
   return true; 
}
var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function drag_drop(e){
if (ie5&&dragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}

function initializedrag(e){
offsetx=ie5? event.clientX : e.clientX
offsety=ie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)

dragapproved=true
document.getElementById("dwindow").onmousemove=drag_drop
}

function loadwindow(url,width,height){
if (!ie5&&!ns6)
window.open(url,"","width=width,height=height,scrollbars=1")
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=width+"px"
document.getElementById("dwindow").style.height=initialheight=height+"px"
document.getElementById("dwindow").style.left="30px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
document.getElementById("cframe").src=url
}
}

function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindow").style.width=initialwidth
document.getElementById("dwindow").style.height=initialheight
}
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}

function closeit(){
document.getElementById("dwindow").style.display="none";
}
function stopdrag(){
dragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}

