function togglediv(x)  
{ 
  document.getElementById(x).style.display='block'; 
} 
 
function inlinediv(x)  
{ 
  document.getElementById(x).style.display='none'; 
} 

function ObjectPosition(obj) {
var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;

}

function hideall(){
  document.all['sub1'].style.visibility = 'hidden';
}
function showact(lobj){
  kont = 1;
  hideall();
  document.all[lobj].style.visibility = 'visible';
}
function hideact(lobj){
  kont = 0;
  setTimeout("hideactx('"+lobj+"')",500);
}
function hideactx(lobj){
  if(kont==0){document.all[lobj].style.visibility = 'hidden';}
}


function getRefToDiv(divID,oDoc) {
   if( !oDoc ) { oDoc = document; }
   if( document.layers ) {
       if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
           //repeatedly run through all child layers
           for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
               //on success, return that layer, else return nothing
               y = getRefToDiv(divID,oDoc.layers[x].document); }
           return y; } }
   if( document.getElementById ) {
       return document.getElementById(divID); }
   if( document.all ) {
       return document.all[divID]; }
   return false;
}


function moveDivTo(x,y,z) {
myReference = getRefToDiv(z);
if( !myReference ) { return; }
if( myReference.style ) { myReference = myReference.style; }
var noPx = document.childNodes ? 'px' : 0;
myReference.left = x + noPx;
myReference.top = y + noPx;
}

function hidediv(x) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById(x).style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // netscape 4 
document.x.visibility = 'hidden'; 
} 
else { // IE 4 
document.all.x.style.visibility = 'hidden'; 
} 
} 

var myform = document.getElementById("frm_src");
if (myform!=null)
{
	if (myform.combo_src_cat!="") myform.combo_src_cat.style.visibility='visible';
	if (myform.combo_src_pri!="") myform.combo_src_pri.style.visibility='visible';
	if (myform.combo_src_siz!="") myform.combo_src_siz.style.visibility='visible';
//	if (myform.combo_brand!="") myform.combo_brand.style.visibility='visible';
//	if (myform.combo_crystaltype!="") myform.combo_crystaltype.style.visibility='visible';
//	if (myform.combo_finish!="") myform.combo_finish.style.visibility='visible';
}

myform = document.getElementById("frm_product_list_main");
if (myform!=null)
{
	if (myform.combo_src_ord!="") myform.combo_src_ord.style.visibility='visible';
}
} 

function showdiv(x,y,z,k) { 
var www=360;
if (k==0)
  www=180;

if (z<=12 || k==0)
	document.getElementById(x).style.left=document.getElementById(y).style.left;
else
	document.getElementById(x).style.left=(ObjectPosition(document.getElementById(y)) - www +106) + "px";

if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById(x).style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // netscape 4 
document.x.visibility = 'visible'; 
} 
else { // IE 4 
document.all.x.style.visibility = 'visible'; 
} 
} 

var myform = document.getElementById("frm_src");
if (myform!=null)
{
	if (myform.combo_src_cat!="") myform.combo_src_cat.style.visibility='hidden';
	if (myform.combo_src_pri!="") myform.combo_src_pri.style.visibility='hidden';
	if (myform.combo_src_siz!="") myform.combo_src_siz.style.visibility='hidden';
//	if (myform.combo_brand!="") myform.combo_brand.style.visibility='hidden';
//	if (myform.combo_crystaltype!="") myform.combo_crystaltype.style.visibility='hidden';
//	if (myform.combo_finish!="") myform.combo_finish.style.visibility='hidden';
}
}

function showdiv2(x) 
{ 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById(x).style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // netscape 4 
document.x.visibility = 'visible'; 
} 
else { // IE 4 
document.all.x.style.visibility = 'visible'; 
} 
} 

var myform = document.getElementById("frm_src");
if (myform!=null)
{
	if (myform.combo_src_cat!="") myform.combo_src_cat.style.visibility='hidden';
	if (myform.combo_src_pri!="") myform.combo_src_pri.style.visibility='hidden';
	if (myform.combo_src_siz!="") myform.combo_src_siz.style.visibility='hidden';
//	if (myform.combo_brand!="") myform.combo_brand.style.visibility='hidden';
//	if (myform.combo_crystaltype!="") myform.combo_crystaltype.style.visibility='hidden';
//	if (myform.combo_finish!="") myform.combo_finish.style.visibility='hidden';
}

myform = document.getElementById("frm_product_list_main");
if (myform!=null)
{
	//if (myform.combo_src_ord!="") myform.combo_src_ord.style.visibility='hidden';
}


} 

