<!--
function toggle_to_simple(){
	document.getElementById('sales_tab').className='searchformtab_selected';
	document.getElementById('products_tab').className='searchformtab_deselected';	
	document.getElementById('customers_tab').className='searchformtab_deselected';
	document.getElementById('hits_tab').className='searchformtab_deselected';
	document.getElementById('enquiries_tab').className='searchformtab_deselected';
	document.getElementById('reviews_tab').className='searchformtab_deselected';				
	document.getElementById('sales_form').className='sales_form_show';
	document.getElementById('products_form').className='products_hide';
	document.getElementById('customers_form').className='customers_form_hide';	
	document.getElementById('hits_form').className='hits_hide';	
	document.getElementById('enquiries_form').className='enquiries_hide';	
	document.getElementById('reviews_form').className='reviews_hide';				
}
function toggle_to_customers(){
	document.getElementById('customers_tab').className='searchformtab_selected';
	document.getElementById('products_tab').className='searchformtab_deselected';
	document.getElementById('sales_tab').className='searchformtab_deselected';	
	document.getElementById('hits_tab').className='searchformtab_deselected';	
	document.getElementById('enquiries_tab').className='searchformtab_deselected';
	document.getElementById('reviews_tab').className='searchformtab_deselected';		
	document.getElementById('customers_form').className='customers_form_show';
	document.getElementById('products_form').className='products_hide';
	document.getElementById('sales_form').className='sales_form_hide';	
	document.getElementById('hits_form').className='hits_hide';	
	document.getElementById('enquiries_form').className='enquiries_hide';	
	document.getElementById('reviews_form').className='reviews_hide';			
}
function toggle_to_products(){
	document.getElementById('products_tab').className='searchformtab_selected';
	document.getElementById('customers_tab').className='searchformtab_deselected';
	document.getElementById('sales_tab').className='searchformtab_deselected';	
	document.getElementById('hits_tab').className='searchformtab_deselected';
	document.getElementById('enquiries_tab').className='searchformtab_deselected';
	document.getElementById('reviews_tab').className='searchformtab_deselected';			
	document.getElementById('products_form').className='products_show';	
	document.getElementById('customers_form').className='customers_form_hide';
	document.getElementById('sales_form').className='sales_form_hide';	
	document.getElementById('hits_form').className='hits_hide';
	document.getElementById('enquiries_form').className='enquiries_hide';	
	document.getElementById('reviews_form').className='reviews_hide';			
}
function toggle_to_hits(){
	document.getElementById('hits_tab').className='searchformtab_selected';
	document.getElementById('products_tab').className='searchformtab_deselected';
	document.getElementById('customers_tab').className='searchformtab_deselected';
	document.getElementById('sales_tab').className='searchformtab_deselected';
	document.getElementById('enquiries_tab').className='searchformtab_deselected';
	document.getElementById('reviews_tab').className='searchformtab_deselected';			
	document.getElementById('hits_form').className='hits_show';	
	document.getElementById('products_form').className='products_hide';	
	document.getElementById('customers_form').className='customers_form_hide';
	document.getElementById('sales_form').className='sales_form_hide';	
	document.getElementById('enquiries_form').className='enquiries_hide';	
	document.getElementById('reviews_form').className='reviews_hide';		
}
function toggle_to_enquiries(){
	document.getElementById('enquiries_tab').className='searchformtab_selected';
	document.getElementById('hits_tab').className='searchformtab_deselected';
	document.getElementById('products_tab').className='searchformtab_deselected';
	document.getElementById('customers_tab').className='searchformtab_deselected';
	document.getElementById('sales_tab').className='searchformtab_deselected';
	document.getElementById('reviews_tab').className='searchformtab_deselected';			
	document.getElementById('hits_form').className='hits_hide';	
	document.getElementById('products_form').className='products_hide';	
	document.getElementById('customers_form').className='customers_form_hide';
	document.getElementById('sales_form').className='sales_form_hide';	
	document.getElementById('enquiries_form').className='enquiries_show';	
	document.getElementById('reviews_form').className='reviews_hide';		
}
function toggle_to_reviews(){
	document.getElementById('enquiries_tab').className='searchformtab_deselected';
	document.getElementById('hits_tab').className='searchformtab_deselected';
	document.getElementById('products_tab').className='searchformtab_deselected';
	document.getElementById('customers_tab').className='searchformtab_deselected';
	document.getElementById('sales_tab').className='searchformtab_deselected';
	document.getElementById('reviews_tab').className='searchformtab_selected';			
	document.getElementById('hits_form').className='hits_hide';	
	document.getElementById('products_form').className='products_hide';	
	document.getElementById('customers_form').className='customers_form_hide';
	document.getElementById('sales_form').className='sales_form_hide';	
	document.getElementById('enquiries_form').className='enquiries_hide';	
	document.getElementById('reviews_form').className='reviews_show';		
}
function rowhl(id, inrow) {
  var row = document.getElementById('tr'+id);
  var odd = id % 2;
  var c = (odd) ? '#f5f5f5' : '#f5f5f5';
  row.style.backgroundColor = (inrow) ? '#f1f1f1' : c;
}
function rowhlcat(id, inrow) {
  var row = document.getElementById('tr'+id);
  var odd = id % 2;
  var c = (odd) ? '#ffffff' : '#ffffff';
  row.style.backgroundColor = (inrow) ? '#f1f1f1' : c;
}
function newWindowAdmin(url,nam) {
   window.open(url,nam,"WIDTH=720,HEIGHT=500,resizable=yes,left=100,top=110,location=no,scrollbars")
}
function newWindow_multi(url,nam) { //admin show templates
   window.open(url,nam,"WIDTH=620,HEIGHT=500,resizable=yes,left=100,top=110,location=no,scrollbars")
}
function switchpageship(select) { // delivery
  var index;
  for(index=0; index<select.options.length; index++)
    if(select.options[index].selected)
      {
        if(select.options[index].value!="")
          window.location.href=select.options[index].value;
        break;
      }
}
function switchpagesid(select) { // CART_4_SHIPPING LINE
  var index;
  for(index=0; index<select.options.length; index++)
    if(select.options[index].selected)
      {
        if(select.options[index].value!="")
          window.location.href=select.options[index].value;
        break;
      }
}
function switchpagesel(select) { // SYS_DROP_CATS
  var index;
  var tt;
  for(index=0; index<select.options.length; index++)
    if(select.options[index].selected) {
        if(select.options[index].value!="")
          tt=select.options[index].value;
          window.location.href=tt;
        }
}
function switchmanuf(select) { // SYS_DROP_MANUFACTURERS
  var index;
  var tt;
  for(index=0; index<select.options.length; index++)
    if(select.options[index].selected) {
        if(select.options[index].value!="")
          tt=select.options[index].value;
          window.location.href="index.php?tp1=CRTNET182&manf_id="+ tt +" ";
        }
}
function popupwin (url, width, height) { // quantity discounts
  window.open(url,'NewWindow','width=' + width + ',height=' + height + ',resizable=yes,left=100,top=100,location=no,scrollbars=yes,toolbar=no,status=no,location=no')
}
function win_colours(url){ // admin only
 myWin = open(url, 'myWin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,screenX=175,left=175,screenY=150,top=150,width=500,height=300');
}
function admx_tpldelete(p_ii,p_ref,p_ftpid) 
{ 
  answer = confirm('Are you Sure? You want to remove this template '+p_ref+'')
  if (answer !=0) 
    { 
    location='index.php?tp1=adm640&deltmp=y&ftpid='+p_ftpid+'&tpname='+p_ref+'&tpid='+p_ii+'';
    } 
}
function admx_del_choice(p_ctp,p_cmcid,p_name,p_mlv) 
{ 
  answer = confirm('Are you Sure? You want to remove '+p_name+'')
  if (answer !=0) 
    { 
    location='index.php?tp1=adm210&act=del&ctp_id='+p_ctp+'&cmc_id='+p_cmcid+'&mlv='+p_mlv+'';
    } 
}
function admx_del_image(p_delid) // user images
{ 
  answer = confirm('Are you Sure? Confirm OK to delete this image?')
  if (answer !=0) 
    { 
    location='index.php?tp1=adm590&dl=y&ref='+p_delid+'';
    } 
}
function admx_del_html1(p_delid) // user images
{ 
  answer = confirm('Are you Sure? Confirm OK to delete this file?')
  if (answer !=0) 
    { 
    location='index.php?tp1=adm5941&dl=y&ref='+p_delid+'';
    } 
}
function admx_del_html2(p_delid) // user images
{ 
  answer = confirm('Are you Sure? Confirm OK to delete this file?')
  if (answer !=0) 
    { 
    location='index.php?tp1=adm5942&dl=y&ref='+p_delid+'';
    } 
}
function admx_del_html3(p_delid) // user images
{ 
  answer = confirm('Are you Sure? Confirm OK to delete this file?')
  if (answer !=0) 
    { 
    location='index.php?tp1=adm5943&dl=y&ref='+p_delid+'';
    } 
}
function admx_del_html4(p_delid) // user images
{ 
  answer = confirm('Are you Sure? Confirm OK to delete this file?')
  if (answer !=0) 
    { 
    location='index.php?tp1=adm5944&dl=y&ref='+p_delid+'';
    } 
}
function admx_del_html5(p_delid) // user images
{ 
  answer = confirm('Are you Sure? Confirm OK to delete this file?')
  if (answer !=0) 
    { 
    location='index.php?tp1=adm5945&dl=y&ref='+p_delid+'';
    } 
}
function admx_del_img(p_id,p_name,p_prog) // product/cat images
{ 
  answer = confirm('Are you Sure? Confirm OK to delete this image?')
  if (answer !=0) 
    { 
    location='index.php?tp1='+p_prog+'&dl=y&ctp_id='+p_id+'&picname='+p_name+'';
    }
}
function admx_del_prod(p_typeid,prod_name,p_prog) // product/cat images
{ 
  answer = confirm('Are you Sure? Confirm OK to delete product '+prod_name+'?')
  if (answer !=0) 
    { 
        location='index.php?tp1='+p_prog+'&pid='+p_typeid+'&delp=y';				
    }
}
function admx_del_cat(p_typeid,cat_name,p_prog) // product/cat images
{ 
  answer = confirm('Are you Sure? Confirm OK to delete category '+cat_name+'?')
  if (answer !=0) 
    { 
        location='index.php?tp1='+p_prog+'&cid='+p_typeid+'&delc=y';				
    }
}

function mouseover(el) {
  el.className = "raised";
}

function mouseout(el) {
  el.className = "button";
}

function mousedown(el) {
  el.className = "pressed";
}

function mouseup(el) {
  el.className = "raised";
}

function clickButton(e, buttonid){ 
	var bt = document.getElementById(buttonid); 
	if (typeof bt == 'object'){ 
		if(navigator.appName.indexOf("Netscape")>(-1)){ 
			if (e.keyCode == 13){ 
				bt.click(); 
				return false; 
			} 
		} 
		if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
			if (event.keyCode == 13){ 
				bt.click(); 
				return false; 
			} 
		} 
	} 
} 

function switchText(object, baseText, eventName)
{
	if (eventName == "blur")
	{
		if (object.value == "")
		{
			object.value = baseText;
		}
	}
	else
	{
		if (object.value == baseText)
		{
			object.value = "";
		}
	}
}

function showPic( imgName, imgCaption, imgWidth, imgHeight, textColor, bgColor ) {
	if(imgWidth<=100)imgWidth=350
	if(imgHeight<=100)imgHeight=450
	winHeight=imgHeight+40;
	w = window.open('','Demo','left=50,top=50,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes, copyhistory=no,width='+imgWidth+',height='+winHeight);
	w.document.write( "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'><head><title>"+imgCaption+"</title>" );
	w.document.write( "<style type='text/css'>" );
	w.document.write( "A {font-family: verdana; font-size: 10px; color: "+textColor+"; text-decoration : none;}" );
	w.document.write( "A:Visited {font-family: verdana;font-size: 10px; color: "+textColor+"; }" );
	w.document.write( "A:Active { font-family: verdana; font-size: 10px; color: "+textColor+"; }" );
	w.document.write( "A:Hover { font-family: verdana; font-size: 10px; color: "+textColor+"; }" );
	w.document.write( "IMG {border-color : "+textColor+";}" );
	w.document.write( "BODY { font-family: verdana; font-size : 10px; font-weight: normal; color : "+textColor+"; background-color : "+bgColor+"; }" );
	w.document.write( "</style>" );
	w.document.write( "<script language='JavaScript' type='text/javascript'>\n");
	w.document.write( "IE5=NN4=NN6=false\n");
	w.document.write( "if(document.all)IE5=true;\n");
	w.document.write( "else if(document.getElementById)NN6=true\n");
	w.document.write( "else if(document.layers)NN4=true\n");
	w.document.write( "function autoSize() {\n");
	w.document.write( "	if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31+20)\n");
	w.document.write( "	else if(NN6) self.sizeToContent()\n");
	w.document.write( "	else top.window.resizeTo(document.images[0].width,document.images[0].height+20)\n");
	w.document.write( "	self.focus()\n");
	w.document.write( "}\n</scr");
  w.document.write( "ipt>\n");
	w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad=" );
	w.document.write( "'javascript:autoSize();'>" );
	w.document.write( "<table cellpadding=0 cellspacing=0 border=0><tr><td colspan=3><img src='"+imgName+"' border=0 alt='"+imgCaption+"'></td></tr>" );
	w.document.write( "<tr><td align='left'><a>mirasonline.co.uk</a></td>" );
	w.document.write( "<td align='right'><a href='javascript:top.window.close();'>close window</a></td></tr>" );
	w.document.write( "</table></body></html>" );
	w.document.close();
}


//-->
