 		function checkAllBox(grdname)
 		{
 			var frm = document.forms(0);
 			var flag = false;
 			//var checkAllBox = document.getElementById(cbx);
 			for(i=0;i< frm.length;i++)
			{
				var elemt = frm.elements[i];
			    var ctrid = elemt.id;
			    var arrId = new Array();
			    arrId = ctrid.split('__');
			    //alert('this is ' + arrId[0]);
			    if(arrId[0]== grdname)
			    {
			    if(elemt.checked)
				{
				    flag = true;
				}
			    }
			}
			return flag;
		}
		function trimString(str) 
		{
			str = this != window? this : str;
			return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
		}
	    function FixedGridHeader(arrTemp)
	    {
	        if(arrTemp.length > 0)
	        {
	         for(var i=0; i<arrTemp.length; i++)
	         {
	            var MyGrid = arrTemp[i];
	    		var tblGrid=document.getElementById(MyGrid);
				var FirstRow,LastRow;
				if((tblGrid!=null) && (tblGrid.rows.length>2))
				{
					FirstRow=tblGrid.rows[0];
					LastRow=tblGrid.rows[tblGrid.rows.length-1];
					FirstRow.className="grid-Pager";
				}
			  }
			}
	    }	
		
		//State and country
			function changeCountrySelect(ddlHidenCountry,ddlCountryID,ddlStateID,HdnStateID) 
			{		
				//alert(ddlHidenCountry + ddlCountryID + ddlStateID + HdnStateID);
				HiddenCountryList  = ddlHidenCountry;	
				MasterCountryList  = ddlCountryID;						   						   
		   		i = MasterCountryList.selectedIndex;
				var strCountry = MasterCountryList.options[i].text;
				var strCountryID = MasterCountryList.options[i].value;
				strCountry = strCountryID + ":" + strCountry;
							
				AddStateFromHiddenList(strCountry,ddlStateID);
				StoreStateID(ddlStateID,HdnStateID);
			}
			function StoreStateID(ddrSateID,HdnSataID)
			{
				StateList  = ddrSateID;	
				i = StateList.selectedIndex;
				var strStateID = StateList.options[i].value;
				hdnVar  = HdnSataID;	
				hdnVar.value = strStateID;
				//alert(strStateID);
				//alert(document.getElementById("hdnStateID").value);
			}
			function AddStateFromHiddenList(strCountry,StateList)
			{
				
				//StateList  = document.forms(0).ddlCState;	
				var total = StateList.options.length;
				for( var ctrLoop =total; ctrLoop >=0; ctrLoop--)
				{
					StateList.options.remove(ctrLoop);
				}
				//alert( HiddenCountryList);
				var totalCountry = HiddenCountryList.options.length;
				//alert( totalCountry );
				var States = 0
				for( var ctrLoop = 0; ctrLoop < totalCountry ; ctrLoop++)
				{
					if( strCountry == HiddenCountryList.options[ctrLoop].value )
					{
						States = HiddenCountryList.options[ctrLoop].text;
						break;
					}
				}
				
				var arrTemp = new Array();
				arrTemp = States.split(",");
				var opt1 = new Option("-Select A State-","-1");
				StateList.options.add(opt1);
				for( var ctrLoop = 0; ctrLoop < arrTemp.length ; ctrLoop++)
				{
					var startPos = arrTemp[ctrLoop].toString().indexOf(":",0) + 1;
					var strText = arrTemp[ctrLoop].toString().substr(startPos,arrTemp[ctrLoop].toString().length - 1);
					var strValue = arrTemp[ctrLoop].toString().substr(0,startPos-1);
					var opt = new Option(strText, strValue);	
					//alert(strText + " " + strValue);
					StateList.options.add(opt);
				}
			}

		function createCookie(name,value,days)
		{
			if (days)
			{
				var date = new Date();
				date.setTime(date.getTime()+(days*24*60*60*1000));
				var expires = "; expires="+date.toGMTString();
			}
			else var expires = "";
			document.cookie = name + "=" + value + expires + "; path=/";
		}

		function readCookie(name)
		{
			var nameEQ = name + "=";
			var ca = document.cookie.split(';');
			//alert(ca);
			for(var i=0;i<ca.length;i++)
			{
				var c = ca[i];
				while (c.charAt(0)==' ') 
				{
					c = c.substring(1,c.length);
				}
				if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
			}
			return null;
		}
		function eraseCookie(name)
		{
			createCookie(name,"",-1);
		}
		
		String.prototype.trim = function(){return this.replace(/^\s+|\s+$/, '');};
		//issue id 3029 starts//
		//var strRegEx ="[#$^'\"~`*]";
		var strRegEx =/\%|\<|\>|\!/g;
		//issue id 3029 ends//
		function  ValidateSpecialChars(e) 
		{
			var retVal = false;
			keyValue = String.fromCharCode(e.keyCode);
			if(keyValue.trim()!='') 
		    { 
				if( keyValue.trim().match(strRegEx) )
				{
					if (!e) var e = window.event;
					retVal = false;
					alert('Special characters not allowed.');
					//alert(e.keyCode);
					e.keyCode = 0;
					e.which=0;
					//ctr.focus();
				}
				else
				{
					var code ;
					code = e.keycode;
				}
            } 
			else 
			{ 
                retVal = true; 
			} 
			return retVal; 
		}
		function  ValidateSpecialCharCheck(e)
		{
			var retVal = false;
			keyValue = String.fromCharCode(e.keyCode);
			if(keyValue.trim()!='') 
		    { 
				if( keyValue.trim().match(strRegEx) )
				{
					if (!e) var e = window.event;
					retVal = false;
					alert('You cannot search by special characters.');
					//alert(e.keyCode);
					e.keyCode = 0;
					e.which=0;
					//ctr.focus();
				}
				else
				{
					var code ;
					code = e.keycode;
				}
            } 
			else 
			{ 
                retVal = true; 
			} 
			return retVal; 
		}
		function  RestrictBackSpace(e) 
		{
			var retVal = false;//alert(e.keyCode);
			if( e.keyCode == 8 )
			{
				if (!e) var e = window.event;
				retVal = false;
				e.keyCode = 0;
				e.which=0;
			}
			else
			{
				var code ;
				code = e.keycode;
			    retVal = true; 
			} 
			return retVal; 
		}
	
	//sukanta added for common method on 19/05/07 for start itb
	function StartItb(id,path)
	{
		//alert(path);
		//1 for page inside GCSecures
		//2 for page inside Secures
		if(document.cookie)
			{
				if(path ==1)
				{
					url="../ITB/PIN_StartITBProcess.aspx?Mode=Startitb&start=yes&source=home&projecttype=1&&projectid="+id;
					document.location.href(url);
				}
				else
				{
					url="../Secures/ITB/PIN_StartITBProcess.aspx?Mode=Startitb&start=yes&source=home&projecttype=1&&projectid="+id;
					document.location.href(url);
				}
			}
		else
			{
				alert("Error In Project Information");
			}
	}
	
	function UPopupWindowCSI(pagename)
	{
		var url=pagename;//"CSIPopUpPage.aspx" or "AreaofWorkPopupPage.aspx"
		var args='width=965,height=450,left=40,top=200,toolbar=0';
		args+='location=0,status=0,menubar=0,scrollbars=0,resizable=0';      
		
		name = window.open(url,"hello",args);
		if(name==null) alert('We have detected that you are using popup blocking software.\nPlease turn off the popup blocker to enable full functionality.');
		else name.location = url;
	}
	function UPopupWindowAddRecipients(pagename)
	{
		var url=pagename;//"CSIPopUpPage.aspx" or "AreaofWorkPopupPage.aspx"
		var args='width=970,height=650,left=40,top=50,toolbar=0';
		args+='location=0,status=0,menubar=0,scrollbars=0,resizable=0';      
		
		name = window.open(url,"hello",args);
		if(name==null) alert('We have detected that you are using popup blocking software.\nPlease turn off the popup blocker to enable full functionality.');
		else name.location = url;
	}
	//This function disables the SearchTextBox, of a form having 
		//Grid-Search functionality, depending upon the Dropdown item passed 
		function EnableDisableSearchTextBox( DropdownControlName, SearchTextBoxName, DropdownOptionValue)
		{
			var AvailableSearchList = document.getElementById( DropdownControlName );
			var SearchtxtBox = document.getElementById( SearchTextBoxName );
		
			var SelectedValue = AvailableSearchList.value;
			var selindex = parseInt(AvailableSearchList.selectedIndex);
			var selectedtext = AvailableSearchList.options[selindex].value;
	        if( selectedtext == DropdownOptionValue )
	        {
				document.getElementById( SearchTextBoxName ).value = '';
				document.getElementById( SearchTextBoxName ).disabled = true;
			}
			else
				document.getElementById( SearchTextBoxName ).disabled = false;
		}
	//This function validates the search criteria
		function ValidateSearchCriteria( DropdownControlName, SearchTextBoxName, SearchTextBoxDateToName, hdnValueForSearchCombo )
		{
			var blnContinue = true;
			var strMessage="";//"Following error/s occurred:" + "\n\n";
			var CreateMessage = false;
			
			AvailableSearchList = document.getElementById( DropdownControlName );
			StartDate = document.getElementById( SearchTextBoxName );
			if( SearchTextBoxDateToName != "" )
				EndDate = document.getElementById( SearchTextBoxDateToName );
			
			var selindex = parseInt(AvailableSearchList.selectedIndex);
			var selectedtext = AvailableSearchList.options[selindex].value;				   
			
			if( SearchTextBoxDateToName != "" )
			{
				//if both the date text boxes are visible
				if( StartDate.style.display == '' && EndDate.style.display == '' )
				{
					if(StartDate.value == '' && EndDate.value == '')
					{
						strMessage = strMessage + "Both Dates cannot be empty" + "\n";
						blnContinue=false;
					}
					else if(StartDate.value == '')
					{
						strMessage = strMessage + "From Date cannot be empty" + "\n";
						blnContinue=false;
					}
					else if(EndDate.value == '')
					{
						strMessage = strMessage + "End Date cannot be empty" + "\n";
						blnContinue=false;
					}
					else if(!check_date(StartDate)) 	   
					{
						strMessage = strMessage + "Invalid From Date" + "\n";					         
						blnContinue=false;							
					}
					else if(!check_date(EndDate)) 	   
					{
						strMessage = strMessage + "Invalid To Date" + "\n";					         					      
						blnContinue=false;							
					}
				}
				else if(StartDate.style.display == '')
				{
					if(StartDate.value == '')
					{
						CreateMessage = true;
					}
				}
			}
			else if(StartDate.style.display == '')
			{
				CreateMessage = true;
			}
			if( CreateMessage )
			{
				if( StartDate.value == '' )
				{
					if((hdnValueForSearchCombo != null) && (hdnValueForSearchCombo != '' ))
					{
						hdnValue = document.getElementById( hdnValueForSearchCombo );
						if(hdnValue != null)
						{
							//alert(hdnValue.value);
							if(hdnValue.value == "0" )//all dropdown values are set to 'ALL'
							{
								strMessage = strMessage + "Select at least one search-criteria value" + "\n";					         					      					   
								blnContinue=false;
							}
							else if( hdnValue.value == "2" )//all dropdown values are set to 'ALL' and the search criteria box is empty even one option is being selected
							{
								strMessage = strMessage + "Please enter the search value and try again" + "\n";					         					      					   
								blnContinue=false;
							}
						}
					}
					else
					{
						strMessage = strMessage + "Please enter the search value and try again" + "\n";					         					      					   
						blnContinue=false;
					}
				}
			}
			if(blnContinue==false)
			{
				alert(strMessage);
			}
				   					   						
			return blnContinue;
		}
		
		function NotificationResponse(x)
		{
			var w=window.open("../../PIN_GC_NotificationResponse.aspx?open=gc&Response="+x+"&SourceForGenInfo=PIN_GC_NotificationResponse.aspx&SourceForGenInfoCaption=Home","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=765,height=600,left=100,top=10,border=0");
			//w=open("../../PIN_GC_NotificationResponse.aspx?Response="+x+"&PageID=7&SourceForGenInfo=SubHUBMain.aspx&SourceForGenInfoCaption=Home","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=660,height=335,left=300,top=175,border=0");
			//var w=window.open("../../PINBidResponse.aspx?Response="+x+"&SourceForGenInfo=SubHUBMain.aspx&SourceForGenInfoCaption=Home","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=800,height=600,left=100,top=100,border=0");
			w.opener=self;
		}
		function NotificationResponsesub(x)
		{
			var w=window.open("../PIN_GC_NotificationResponse.aspx?Response="+x+"&SourceForGenInfo=PIN_GC_NotificationResponse.aspx&SourceForGenInfoCaption=Home","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=765,height=600,left=100,top=10,border=0");
			//var w=window.open("../PIN_GC_NotificationResponse.aspx?PageID=7&Response="+x+"&SourceForGenInfo=PIN_GC_NotificationResponse.aspx&SourceForGenInfoCaption=NotificationCenter","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=800,height=600,left=100,top=100,border=0");
			//var w=window.open("../PINBidResponse.aspx?Response="+x+"&SourceForGenInfo=SubHUBMain.aspx&SourceForGenInfoCaption=Home","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=800,height=600,left=100,top=100,border=0");
			w.opener=self;
						
		}
		function NotificationResponsePrivate(x)
		{
			//alert('open');
			var w=window.open("../PIN_GC_NotificationResponse.aspx?Link=1&Response="+x+"&SourceForGenInfo=PIN_GC_NotificationResponse.aspx&SourceForGenInfoCaption=Home","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=765,height=600,left=100,top=10,border=0");
			w.opener=self;
			
		}
		function NotificationResponsesubfromHome(x)
		{
			var w=window.open("../PIN_GC_NotificationResponse.aspx?Response="+x+"&SourceForGenInfo=PIN_GC_NotificationResponse.aspx&SourceForGenInfoCaption=Home&fromhome=true","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=765,height=600,left=100,top=10,border=0");
			if(document.getElementById('hdn_Jobvalue')!=null)
			{
				document.getElementById('hdn_Jobvalue').value = '2';
			} 
			//var w=window.open("../PIN_GC_NotificationResponse.aspx?PageID=7&Response="+x+"&SourceForGenInfo=PIN_GC_NotificationResponse.aspx&SourceForGenInfoCaption=NotificationCenter","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=800,height=600,left=100,top=100,border=0");
			//var w=window.open("../PINBidResponse.aspx?Response="+x+"&SourceForGenInfo=SubHUBMain.aspx&SourceForGenInfoCaption=Home","Php","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=800,height=600,left=100,top=100,border=0");
			w.opener=self;
						
		}
		//this method calls for only private jobs module,here we are passing source=private Jobs
		function ProjectDetails_ITBgcnewprivate(headrid,recipientid,eid)
			{
				document.location.href("../Pin_PrivateITBInfo.aspx?source=Private Jobs&HeaderID="+headrid+"&mode=create&RecipientID="+recipientid+"&UniqueID="+eid);			
			}
		
		function ProjectDetails_ITB_GCHome(HeaderID,RecID,UniqueID,SubscriptionModel)
		{
			var strURL = "";
			//alert(HeaderID + 'Recp id = ' + RecID + 'uniqueid=' + UniqueID);
			if( SubscriptionModel == 3 || SubscriptionModel == 7 
				|| SubscriptionModel == 0 || SubscriptionModel == 10 )//basic/expired/suspended/non-paid
			{
				strURL = "Pin_PrivateITBInfo.aspx?source=Home&HeaderID="+HeaderID+"&mode=create&RecipientID=" + RecID + "&UniqueID="+UniqueID;
			}
			else
			{
				strURL = "../Pin_PrivateITBInfo.aspx?source=Home&HeaderID="+HeaderID+"&mode=create&RecipientID=" + RecID + "&UniqueID="+UniqueID;
			}
			//alert(strURL);
			
			document.location.href(strURL);			
		}
		function ProjectDetails_ITB_SubHome(HeaderID,RecID,UniqueID)
		{
			//alert(HeaderID + 'Recp id = ' + RecID + 'uniqueid=' + UniqueID);
			document.location.href("Pin_PrivateITBInfo.aspx?source=Home&HeaderID="+HeaderID+"&mode=create&RecipientID="+RecID+"&UniqueID="+UniqueID);
		}	
			
		function ProjectDetails_ITBgc(headrid,recipientid)
			{
				document.location.href("../Pin_PrivateITBInfo.aspx?source=Home&HeaderID="+headrid+"&mode=create&RecipientID="+recipientid);			
			}

		function ProjectDetails_ITBsub(headrid,recipientid)
		{
			document.location.href("Pin_PrivateITBInfo.aspx?source=Home&HeaderID="+headrid+"&mode=create&RecipientID="+recipientid);			
		}
		
		

				function testcontrol(cntrl)
				{
					var isValid;
					var ret=/^\w[^^$@%\/\\"'~!?<>+&*#:;]*$/;
					//alert('test');
					//alert(cntrl.value);
					//alert(cntrl.value.length);
					if(cntrl!=null && cntrl.value.length>0 && !cntrl.value.trim().match(ret))
					{
						isValid = false;
						//cntrl.value ='';
						cntrl.focus();
						alert( " contain special characters.");
					}
					else
					{
						isValid = true;
					}
					return isValid;
				}
		
		
		String.prototype.trim = function() 
				{ return this.replace(/^\s+|\s+$/, ''); };
				//Validation with regexp for special chars checking.
				

				function fnCheckPackageName(cntrl)
				{
					var re=/^\w[^^$@%\/\\"'~!?<>+&*#:;]*$/;
					var isValid;
					//alert(cntrl.value);
					//alert(cntrl.value.length);
					if(cntrl!=null && cntrl.value.length>0 && !cntrl.value.trim().match(re))
					{
						isValid = false;
						//cntrl.value ='';
						cntrl.focus();
						alert( " contain special characters.");
					}
					else
					{
						isValid = true;
					}
					return isValid;
				}
				//added by sukanta  taking textbox  @ when we select email from dropdownlist(Notificationpicklist)
				function fnCheckPackageNamenew(cntrl,cntrl2)
				{
					//alert(cntrl2.value);
					var isValid;
					if(cntrl2.value =='4' || cntrl2.value =='10' )
					{
						isValid = fnCheckPackageNamefor(cntrl2,cntrl);
						//alert(isValid);
					}
					else
					{
						String.prototype.trim = function() 
						{ return this.replace(/^\s+|\s+$/, ''); };
						//Validation with regexp for special chars checking.
						var renew=/^\w[^^$@%\/\\"'~!?<>+&*#:;]*$/;
						var isValid;
						if(cntrl!=null && cntrl.value.length>0 && !cntrl.value.trim().match(renew))
						{
							isValid = false;
							cntrl.focus();
							alert( " contain special characters.");
						}
						else
						{
							isValid = true;
						}
					}
					return isValid;
				}
				
				function AddressTestcontrol(cntrl)
				{
					var isValid;
					var ret=/^\w[^^$@%\\"'~!?<>+&*#:;]*$/;
					//alert('test');
					//alert(cntrl.value);
					//alert(cntrl.value.length);
					if(cntrl!=null && cntrl.value.length>0 && !cntrl.value.trim().match(ret))
					{
						isValid = false;
						//cntrl.value ='';
						cntrl.focus();
						alert( " contain special characters.");
					}
					else
					{
						isValid = true;
					}
					return isValid;
				}
				
				
				
				
				
				
				
				function fnCheckPackageNamefor(cntrl2,cntrl)
					{
						String.prototype.trim = function() 
					{ return this.replace(/^\s+|\s+$/, ''); };
				//Validation with regexp for special chars checking.
					var re=/^[^^$%\/\\"'~!?<>+&*#:;]*$/;
					var isValid;
					if(cntrl!=null && cntrl.value.length>0 && !cntrl.value.trim().match(re))
					{
						isValid = false;
						cntrl.focus();
						alert(" contain special characters.");
					}
					else
					{
						isValid = true;
					}
					return isValid;
					//alert(isValid);
				}
			function HideLegendInPublic()
			{
				var respondtoitb =document.getElementById('Legend1_td_respond');
				var respondimage =document.getElementById('Legend1_td_responditb');
				if(respondtoitb !=null)
				respondimage.style.display="none";
				if(respondimage !=null)
				respondtoitb.style.display="none";
			}
				
			function HideLegend()
			{
				var legendimg = document.getElementById('Legend1_td_favadd');
				var legendshowline =document.getElementById('Legend1_td_middle');
				var legendaddtext = document.getElementById('Legend1_td_fav');
				var respondtoitb =document.getElementById('Legend1_td_respond');
				var respondimage =document.getElementById('Legend1_td_responditb');
				if(legendimg !=null)
				legendimg.style.display="none";
				if(legendaddtext !=null)
				legendaddtext.style.display="none";
				if(respondtoitb !=null)
				respondtoitb.style.display="none";
				if(respondimage !=null)
				respondimage.style.display="none";
				if(legendshowline !=null)
				legendshowline.style.display="none";
			}		
			function HideLegendForDraft()
			{
				var legendstart = document.getElementById('Legend1_td_start');
				var legendstartitb = document.getElementById('Legend1_td_startitb');
				var legendmiddle = document.getElementById('Legend1_td_showSep');
				var legendimg = document.getElementById('Legend1_td_favadd');
				var legendshowline =document.getElementById('Legend1_td_middle');
				var legendaddtext = document.getElementById('Legend1_td_fav');
				var respondtoitb =document.getElementById('Legend1_td_respond');
				var respondimage =document.getElementById('Legend1_td_responditb');
				if(legendstart !=null)
					legendstart.style.display="none";
				if(legendstartitb !=null)
					legendstartitb.style.display="none";
				if(legendmiddle!=null)
					legendmiddle.style.display="none";
				if(legendimg !=null)
					legendimg.style.display="none";
				if(legendaddtext !=null)
					legendaddtext.style.display="none";
				if(respondtoitb !=null)
					respondtoitb.style.display="none";
				if(respondimage !=null)
					respondimage.style.display="none";
				if(legendshowline !=null)
					legendshowline.style.display="none";
			}		
			function trim(stringToTrim) {
				return stringToTrim.replace(/^\s+|\s+$/g,"");
			}
			function ltrim(stringToTrim) {
				return stringToTrim.replace(/^\s+/,"");
			}
			function rtrim(stringToTrim) {
				return stringToTrim.replace(/\s+$/,"");
			}
	        
	        function ProductView()
	        {
	            var varBidInfo = null;
	            var intProductID = document.getElementById('hdnProductID').value;
	            var strURL = "ProductView.aspx?ProductID=" + intProductID;
	            //alert(strURL); 
	            oWinRetValue = openStdDlg(strURL, varBidInfo, 750, 520);
	        }
	        
	        function openStdDlg(sPath, oArgs, iX, iY)
            {
	            return window.showModalDialog(sPath, oArgs, "dialogWidth:" + iX + "px;dialogHeight:" + iY + "px;help:0;status:0;scroll:0;center:1");
            }
            
            function chkEmail(cntrl)
			{
				re=/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?[\s]*)$/;		            

				if(cntrl!=null && cntrl.value.trim()!='' && !cntrl.value.trim().match(re)) 
				{ 
					isValid = false;
					var strMessage;
					
					strMessage='You have entered an invalid email address !';

					alert(strMessage);
					cntrl.focus();		
				} 
				else
				{
					isValid = true;    
				}
				return isValid;
			}
			function ShowImagePopup(ProductID, AuthImageBig)
            {
                if( ProductID == '0' )
                {
                    window.open('PopupPhoto.aspx?ProductID=' + ProductID + '&AuthImageBig=' + 
                            AuthImageBig ,"Authentication","toolbars=no,scrollbars=yes,resize=yes,titlebar=no,alwaysRaised=yes,width=950,height=670,resizable=1,left=50,top=20,border=0")
                }
                else
                {
                    window.open('PopupPhoto.aspx?ProductID=' + ProductID + '&AuthImageBig=' + 
                            AuthImageBig ,"Authentication","toolbars=no,scrollbars=yes,resize=no,titlebar=no,alwaysRaised=yes,width=550,height=470,resizable=0,left=250,top=150,border=0")
                }
            }
