		function priceList(itemnumber,title,price,filename)
		{
			
			window.open("/newproduct/Suggest_A_Price.aspx?item_number="+itemnumber+"&group_title="+escape(title)+"&item_silver="+price+"&Code_str="+filename,'','width=600,height=550')
		}
		
		function tellafriend(code_str,itemnumber,title)
		{
			window.open("/newproduct/Emailthispage.aspx?Code_str="+code_str+"&item_number="+itemnumber+"&group_title="+escape(title),'','width=600,height=525')
        }
		
		function Srch(Item)
		{
			window.location.href = "/sortSearch/searchAlphabetically.aspx?Key=" +Item
		}
		
		function getdatatemp(url)
		{
			window.location.href = url;
		}
		
		function AddToCartProductlink(id,itemno,qty)
				{
				
					qty=document.getElementById(id).value;
					var url = window.location.toString();
					var name1=qty;
					for( j=0;j<name1.length;j++)
					{
							ch = name1.charAt(j);
							if((ch>='0' && ch<='9')|| (ch==' '))
							{
							continue;
							}
							else
							{
									alert("Please Enter Valid Quantity");
									document.getElementById(id).select();
									document.getElementById(id).focus();
									return false;	
							}	
		
					}
					if(trimWhitespace(document.getElementById(id).value)=="0")
					{
		
						alert("Please Enter valid Quantity");
						document.getElementById(id).select();
						document.getElementById(id).focus();
						return false;
					}
					if(trimWhitespace(document.getElementById(id).value).length==0)
					{
						status="False"
						alert("Please Enter valid Quantity");
						document.getElementById(id).select();
						document.getElementById(id).focus();
						return false;
					}
						//alert(url);
						
					var rand_no2 = Math.random();
					window.location="/CreateHtml/Addtocart.aspx?item="+ itemno +"&qty=" + qty + "&sell=''&backurl=" + url + "&simply=" + rand_no2 ;
		}
		function getdata(groupcode,itemnumber,catname)
		{
			//url = "/CreateHTML/getindividualitem.aspx?groupcode=" + groupcode + "&itemnumber=" + itemnumber	+ "&catname=" + catname		
			//getUsercontrol(groupcode,itemnumber,url) ;
			alert("Here");
			getheader();
			getfooter();
			
		}
		function getload(groupcode,itemno)
		{
			getheader();
			getfooter();
			getprice(groupcode,itemno);
		}
		function getgroupload(groupcode,itemno,groptitle)
		{
			getheader();
			getfooter();
			getgroupitems(groupcode,itemno,groptitle);
		}
		function getdatagroup(groupcode,itemnumber,catname)
		{
			url = "/CreateHTML/getGroupitem.aspx?groupcode=" + groupcode + "&itemno=" + itemnumber + "&catname=" + catname	
			getUsercontrol(groupcode,itemnumber,url) ;
		}
		function chkEnterPress4Search(e)
		{
		
			
			if(e.keycode==9)
			{
			return clear();
			}

			if(e.keyCode==13)
			{
				return search();
			}


		}
		function search()
		{
			
			if(trimWhitespace(document.getElementById('txtSearch').value)=="Search")
			{
				alert("Please enter the search string.");
				//document.getElementById('txtSearch').select();
				document.getElementById('txtSearch').focus();
				return false;
			}
			if(trimWhitespace(document.getElementById('txtSearch').value).length==0)
			{
				alert("Please enter the search string.");
				document.getElementById('txtSearch').select();
				document.getElementById('txtSearch').focus();
				return false;
			}
			if(trimWhitespace(document.getElementById('txtSearch').value).length <=2)
			{
				alert("Please enter the search string greater than 2 character.");
				document.getElementById('txtSearch').select();
				document.getElementById('txtSearch').focus();
				return false;
			}
			else
			{
				var keyword = document.getElementById('txtSearch').value;
				
				
				document.location.href="/newsearch/Global_search.aspx?txtSearch=" + keyword + "&exact=exact&ordersearch=popular";
				
				return true;
			}
		}
		
		
		function trimWhitespace(string) 
		{
			var newString  = '';
			var substring  = '';
			beginningFound = false;
			
			// copy characters over to a new string
			// retain whitespace characters if they are between other characters
			for (var i = 0; i < string.length; i++) 
			{
				
				// copy non-whitespace characters
				if (string.charAt(i) != ' ' && string.charCodeAt(i) != 9) 
				{
					
					// if the temporary string contains some whitespace characters, copy them first
					if (substring != '') 
					{
						newString += substring;
						substring = '';
					}
					newString += string.charAt(i);
					if (beginningFound == false) beginningFound = true;
				}
				
				// hold whitespace characters in a temporary string if they follow a non-whitespace character
				else if (beginningFound == true) substring += string.charAt(i);
			}
			return newString;
		}
		
		
		
		

		function getUsercontrol(groupcode,itemnumber,url) 
		{
			//alert(id);
			var req = false;
			
					
			var rand_no = Math.random();
			
			refurl= document.referrer;
			//url = "/CreateHTML/getindividualitem.aspx?groupcode=" + groupcode + "&itemnumber=" + itemnumber + "&simply=" + rand_no
			url= url + "&simply=" + rand_no	 + "&refurl=" + refurl	
						
			// For Safari, Firefox, and other non-MS browsers
			if (window.XMLHttpRequest) {
				try {
				req = new XMLHttpRequest();
				} catch (e) {
				req = false;
				}
			} else if (window.ActiveXObject) {
				// For Internet Explorer on Windows
				try {
				req = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e) {
				try {
					req = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {
					req = false;
				}
				}
			}
			
			if (req)
			 {
				// Synchronous request, wait till we have it all
				req.open('GET', url, false);
				req.send(null);
				
				
				//element.innerHTML = req.responseText;
				var str =req.responseText;
				try {
				document.close(); 				
				document.write(str);
				} catch (e) {}
				document.close();
				
						
				
			} 
		}
		function Show()
		{
			document.getElementById("popcat").style.display="block";

		}
		function Hide()
		{
			/* hide the pop-up */
			document.getElementById("popcat").style.display="none";


		}
		function Showright()
		{
			document.getElementById("popright").style.display="block";

		}
		function Hideright()
		{
			/* hide the pop-up */
			document.getElementById("popright").style.display="none";

							
		}
		
		
		function AddToCartGroup(totcount)
		{
			var flag="no"
			var item="";
			var qty="";
			invalid=0;
			var status="true";
			var i;
			var url = window.location.toString();
			for(i=0;i<totcount;i++)
			{
				if(trimWhitespace(document.getElementById("txtqty_" + i).value)=="0")
				{
					status="False"
					alert("Please Enter valid Quantity");
					document.getElementById("txtqty_" + i).select();
					document.getElementById("txtqty_" + i).focus();
					return false;
				}
				else if(trimWhitespace(document.getElementById("txtqty_" + i).value)!="")
				{
						flag="yes"
						item=item + document.getElementById("txtitem_" + i).value + "!";
						qty=qty + document.getElementById("txtqty_" + i).value + "!";					
				}	
				var name1=document.getElementById("txtqty_" + i).value;
				for( j=0;j<name1.length;j++)
				{
								ch = name1.charAt(j);
								if((ch>='0' && ch<='9')|| (ch==' '))
								{
								continue;
								}
								else
								{
										alert("Please Enter Valid Quantity");
										document.getElementById("txtqty_" + i).select();
										document.getElementById("txtqty_" + i).focus();
										return false;	
								}	

				}
				//alert("txtqty_" + i);
				//alert(document.getElementById("txtqty_" + i).value);
			}
			if(flag=="no")
			{
				alert("Please Enter The Quantity");
				//return false;

			}
			else 
			{
			
			window.location="/createhtml/addtocartgroup.aspx?item="+ item +"&qty=" + qty + "&backurl=" + url
			//window.location.href("/producthtml/addtocartgroup.aspx?item="+ "iii!" +"&qty=" + "1!")
			}
				
		}
		function Diagram(itemnumber)
		{

			

			window.open("/Showdiagram/Diagram.aspx?item_number="+itemnumber,'_blank','status=yes,scrollbars=yes,resizable=1,width=650,height=550')
			


		}
		function getreview(itemno,groupcode)
		{
			document.location.href="/newproduct/product_review.aspx?itemno=" + itemno + "&groupcode=" + groupcode ;
		}
		function getimage(imgid)
		{

			document.getElementById("imgslide").src="/image_Gallery/large/" + imgid;
		}
		function keyaddgroup(e)
		{

			if(window.event)
			{
				var unicode=e.keyCode? e.keyCode : e.charCode    //IE
			}
			else
			{
				unicode = e.which;   //firefox
			}  
			if(unicode==13)
			{
				document.getElementById("add1").focus();
				//var objrec = document.getElementById('recalculate');
				//objrec.click();
				//document.getElementById(obj.id).focus();
				return true;
			}
			else
			{
				return false;
			}
		}
		
		function getheader() 
				{
					
					var req = false;
					
							
					var rand_no = Math.random();
					refurl= document.referrer;
							
					url = "/CreateHTML/getheader.aspx?simply=" + rand_no + "&refurl=" + refurl
					//alert(url);
							
								
					// For Safari, Firefox, and other non-MS browsers
					if (window.XMLHttpRequest) {
						try {
						req = new XMLHttpRequest();
						} catch (e) {
						req = false;
						}
					} else if (window.ActiveXObject) {
						// For Internet Explorer on Windows
						try {
						req = new ActiveXObject("Msxml2.XMLHTTP");
						} catch (e) {
						try {
							req = new ActiveXObject("Microsoft.XMLHTTP");
						} catch (e) {
							req = false;
						}
						}
					}
					
					if (req)
					 {
						// Synchronous request, wait till we have it all
						req.open('GET', url, false);
						req.send(null);
						
						
						//element.innerHTML = req.responseText;
						var str =req.responseText;
						try {
						document.getElementById('headercon').innerHTML=str
						} catch (e) {}
						document.close();
						
								
						
					} 
				}
				
				function getfooter() 
				{
					
					var req = false;
					
							
					var rand_no = Math.random();
					refurl= document.referrer;
							
					url = "/CreateHTML/getfooter.aspx?simply=" + rand_no + "&refurl=" + refurl
					//alert(url);
							
								
					// For Safari, Firefox, and other non-MS browsers
					if (window.XMLHttpRequest) {
						try {
						req = new XMLHttpRequest();
						} catch (e) {
						req = false;
						}
					} else if (window.ActiveXObject) {
						// For Internet Explorer on Windows
						try {
						req = new ActiveXObject("Msxml2.XMLHTTP");
						} catch (e) {
						try {
							req = new ActiveXObject("Microsoft.XMLHTTP");
						} catch (e) {
							req = false;
						}
						}
					}
					
					if (req)
					 {
						// Synchronous request, wait till we have it all
						req.open('GET', url, false);
						req.send(null);
						
						
						//element.innerHTML = req.responseText;
						var str =req.responseText;
						try {
						document.getElementById('footercon').innerHTML=str
						} catch (e) {}
						document.close();
						
								
						
					} 
		}
		function getprice(groupcode,itemnumber) 
				{
					
					var req = false;
					
							
					var rand_no = Math.random();
					refurl= document.referrer;
							
					url = "/CreateHTML/indiprice.aspx?simply=" + rand_no + "&refurl=" + refurl + "&groupcode=" + groupcode + "&itemnumber=" + itemnumber
					//alert(url);
							
								
					// For Safari, Firefox, and other non-MS browsers
					if (window.XMLHttpRequest) {
						try {
						req = new XMLHttpRequest();
						} catch (e) {
						req = false;
						}
					} else if (window.ActiveXObject) {
						// For Internet Explorer on Windows
						try {
						req = new ActiveXObject("Msxml2.XMLHTTP");
						} catch (e) {
						try {
							req = new ActiveXObject("Microsoft.XMLHTTP");
						} catch (e) {
							req = false;
						}
						}
					}
					
					if (req)
					 {
						// Synchronous request, wait till we have it all
						req.open('GET', url, false);
						req.send(null);
						
						
						//element.innerHTML = req.responseText;
						var str =req.responseText;
						try {
						document.getElementById('itemprice').innerHTML=str
						} catch (e) {}
						document.close();
						
								
						
					} 
		}
		
		function getgroupitems(groupcode,itemnumber,grouptitle) 
				{
					
					var req = false;
					
							
					var rand_no = Math.random();
					refurl= document.referrer;
							
					url = "/CreateHTML/groupitems.aspx?simply=" + rand_no + "&refurl=" + refurl + "&groupcode=" + groupcode + "&itemno=" + itemnumber + "&grouptitle=" + grouptitle
					//alert(url);
							
								
					// For Safari, Firefox, and other non-MS browsers
					if (window.XMLHttpRequest) {
						try {
						req = new XMLHttpRequest();
						} catch (e) {
						req = false;
						}
					} else if (window.ActiveXObject) {
						// For Internet Explorer on Windows
						try {
						req = new ActiveXObject("Msxml2.XMLHTTP");
						} catch (e) {
						try {
							req = new ActiveXObject("Microsoft.XMLHTTP");
						} catch (e) {
							req = false;
						}
						}
					}
					
					if (req)
					 {
						// Synchronous request, wait till we have it all
						req.open('GET', url, false);
						req.send(null);
						
						
						//element.innerHTML = req.responseText;
						var str =req.responseText;
						try {
						document.getElementById('gritems').innerHTML=str
						} catch (e) {}
						document.close();
						
								
						
					} 
		}
function google()
		{
			window.location.href = "http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=" + document.location.href + "&title=" + document.title;
		}
		function Digg()
		{
			window.location.href = "http://digg.com/submit?phase=2&url="+document.location.href+"&title="+document.title;
		}
		function FURL()
		{
			window.location.href = "http://www.furl.net/store?s=f&to=0&u="+document.location.href+"&ti="+document.title;
		}
		function REDDIT()
		{
			window.location.href = "http://reddit.com/submit?url="+document.location.href+"&title="+document.title;
		}
		function STUMBLEUPON()
		{
			window.location.href = "http://www.stumbleupon.com/submit?url="+document.location.href+"&title="+document.title;
		}
		function TECHNORATI()
		{
			window.location.href = "http://technorati.com/faves?add="+document.location.href;
		}
		function SQUIDOO()
		{
			window.location.href = "http://www.squidoo.com/lensmaster/bookmark?"+document.location.href+"&title="+document.title;
		}
		function WINDOWS()
		{
			window.location.href = "https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url="+document.location.href+"&title="+document.title;
		}
		function YAHOO()
		{
			window.location.href = "http://myweb.yahoo.com/myresults/bookmarklet?u="+document.location.href+"&t="+document.title;
		}
		function ASK()
		{
			window.location.href = "http://myjeeves.ask.com/mysearch/BookmarkIt?v=1.2&t=webpages&url="+document.title.href+"&title="+document.title;
		}