<!--
		function MM_preloadImages() { //v3.0
		  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
		}
		//-->

function newWindow( winURL, winName, height ) {
  theWin = window.open( winURL, winName, 'width=800,height=' + height + ',scrollbars=yes,resizable=1' )
  theWin.focus()
}	
function splitthis()
{
myString = new String(document.frm.categoryid1.options[document.frm.categoryid1.selectedIndex].value)
splitString = myString.split("|")
document.frm.categoryid.value=splitString[0];
document.frm.subcategoryid.value=splitString[1];
document.frm.catname.value=splitString[2];
document.frm.subcatname.value=splitString[3];

document.frm.submit();
}
	var LowBgColor='#404f56';			// Background color when mouse is not over
	var LowSubBgColor='#404f56';			// Background color when mouse is not over on subs
	var HighBgColor='#404f56';			// Background color when mouse is over
	var HighSubBgColor='#404f56';			// Background color when mouse is over on subs
	var FontLowColor='#ffffff';			// Font color when mouse is not over
	var FontSubLowColor='#ffffff';			// Font color subs when mouse is not over
	var FontHighColor='#000000';			// Font color when mouse is over
	var FontSubHighColor='#000000';			// Font color subs when mouse is over
	var BorderColor='#2c373b';			// Border color
	var BorderSubColor='#2c373b';			// Border color for subs
	var BorderWidth=1;				// Border width
	var BorderBtwnElmnts=1;			// Border between elements 1 or 0
	var FontFamily="verdana,arial,comic sans ms,technical"	// Font family menu items
	var FontSize=8;				// Font size menu items
	var FontBold=0;				// Bold menu items 1 or 0
	var FontItalic=0;				// Italic menu items 1 or 0
	var MenuTextCentered='center';			// Item text position 'left', 'center' or 'right'
	var MenuCentered='left';			// Menu horizontal position 'left', 'center' or 'right'
	var MenuVerticalCentered='top';		// Menu vertical position 'top', 'middle','bottom' or static
	var ChildOverlap=0.11;				// horizontal overlap child/ parent
	var ChildVerticalOverlap=.0;			// vertical overlap child/ parent
	var StartTop=120;				// Menu offset x coordinate
	var StartLeft=7;				// Menu offset y coordinate
	var VerCorrect=0;				// Multiple frames y correction
	var HorCorrect=0;				// Multiple frames x correction
	var LeftPaddng=0;				// Left padding
	var TopPaddng=2;				// Top padding
	var FirstLineHorizontal=0;			// SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
	var MenuFramesVertical=1;			// Frames in cols or rows 1 or 0
	var DissapearDelay=200;			// delay before menu folds in
	var TakeOverBgColor=1;			// Menu frame takes over background color subitem frame
	var FirstLineFrame='navig';			// Frame where first level appears
	var SecLineFrame='space';			// Frame where sub levels appear
	var DocTargetFrame='space';			// Frame where target documents appear
	var TargetLoc='';				// span id for relative positioning
	var HideTop=0;				// Hide first level when loading new document 1 or 0
	var MenuWrap=1;				// enables/ disables menu wrap 1 or 0
	var RightToLeft=0;				// enables/ disables right to left unfold 1 or 0
	var UnfoldsOnClick=0;			// Level 1 unfolds onclick/ onmouseover
	var WebMasterCheck=0;			// menu tree checking on or off 1 or 0
	var ShowArrow=0;				// Uses arrow gifs when 1
	var KeepHilite=1;				// Keep selected path highligthed
	var Arrws=['tri.gif',5,10,'tridown.gif',10,5,'trileft.gif',5,10];	// Arrow source, width and height

function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}


/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementById(cookievalue).style.display="block"
}
}

function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}

if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementById)
window.onload=onloadfunction

if (persistmenu=="yes" && document.getElementById)
window.onunload=savemenustate


//HV Menu- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more

function Go(){return}



function Go(){return}




function search() {

  if (document.frmitemsearch.txtitemname.value=="" || document.frmitemsearch.txtitemname.value=="Search by item name or stock No.")
  {
  alert("Please enter search item value");
  document.frmitemsearch.txtitemname.value="";
document.frmitemsearch.txtitemname.focus();
  }
  else
  {
  document.frmitemsearch.submit();
  }
}





/*****************/

function emailcheck()
{
  str=document.frm1.email.value 
  if(str.length>0)
   {
	var cnt=0;
	var cntp=0;
	var p=0;
	var q=0;
	var s=str.length;
	for(var ii=0;ii<str.length;ii++)
	{	if(str.charAt(ii)==".")
			{
				cnt++;
				p=ii;
			}
			if(str.charAt(ii)=="@")
			{
				cntp++;
				q=ii;
			}
	}
	if ( cntp!=1 || p<q || q==0 ||p-q<2 || p==s-1)
	{
	alert("Please enter email address in proper format !")
	document.frm1.email.value="";
	document.frm1.email.focus();
	}		
 }
}
function isOK()
{

if(document.frm1.name.value=="")
	{
	alert("Please enter the Name!");
	document.frm1.name.focus();
	}

else if(document.frm1.address1.value=="")
	{alert("Please enter your Address !");document.frm1.address1.focus();}

else if(document.frm1.country[document.frm1.country.selectedIndex].value=="")
	{
	alert("Please enter the Country !");
	document.frm1.country.focus();
	}
	
else if(document.frm1.email.value=="")
	{
	alert("Please enter the Emailid !");
	document.frm1.email.focus();
	}
else
	{
	document.frm1.submit();
	}

}

function newWindow(winURL) {
  theWin = window.open( winURL, 'New1','width=350,height=529,scrollbars=0,resizable=0')
  theWin.focus()
}

  function swapImage(str,w,h)
{
	var obj=document.getElementById("prodimage");
	obj.src=str;
	obj.width=w;
	obj.height=h;
	}

function showImages()
{
var obj=document.getElementById("prodimage");
var str=obj.src;
newWindowPrint('/showimage.asp?image='+str,'winName', 300 );
}

function newWindowPrint( winURL) {
  theWin = window.open( winURL, 'Slideshow', 'width=700,height=800,scrollbars=yes,resizable=1' )
  theWin.focus()
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() 
{ 
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3){  test=args[i+2]; val=MM_findObj(args[i]);
 if (val){ nm=val.id;if((val=val.value)!=""){
if (test.indexOf('isEmail')!=-1){	p=val.indexOf('@');	if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';	} 
else if(test.indexOf('isSame')!=-1){val1=MM_findObj(args[i+1]);	nm1=val1.id;if(val != val1.value)	errors+='- '+nm+' and '+nm1+'must be same \n';}
else if (test!='R'){ num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1){p=test.indexOf(':');min=test.substring(8,p); max=test.substring(p+1);
if (num < min || max < num)errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';}}}else if (test.charAt(0) == 'R') 
errors += '- '+nm+' is required.\n';} }   
 if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}