// JavaScript Document


//====================================================================================
function IPanel_Toggle(Code , Serial) 
{
	//Reset All...
	var TotalCells  = $$("IPanel_TotalCells").value ; 
	
	for(i=0 ; i<=TotalCells ; i++) {
		$$("IPanel_"+i+"_Cell").style.cursor = 'pointer' ; 
		$$("IPanel_"+i+"_Pointer").style.visibility = "hidden" ;
		$$("IPanel_Output_"+i).style.display = 'none' ;
	}
	
	//Marking the Choosen one...
	var ChoosenCell    = $$("IPanel_"+Code+"_Cell") ; 
	var ChoosenPointer = $$("IPanel_"+Code+"_Pointer") ; 
	var ChoosenOutput  = $$("IPanel_Output_"+Code) ; 
	
	ChoosenCell.style.cursor = "default" ; 
	ChoosenPointer.style.visibility = "visible" ; 
	ChoosenOutput.style.display = '' ; 
	
	return ; 
	
}


//====================================================================================
function FormSearch()
{
	//Checking Data... 
	var Errorred = false ; 
	
	Obj = $$("Word") ;
	if(!Obj.value) {
		FormErrorHighlight(Obj) ;
		Errorred = true ; 
	}
	else {
		FormErrorRefresh(Obj) ;
	}
	
	//Preparing for Sending to server...
	if(Errorred) return ; 
	
	$$('frmSearch').submit() ; 
}


//====================================================================================
function PageDirector(Location) 
{
	location.href = Location ; 
}


//====================================================================================
function $$(ID)
{
	return document.getElementById(ID) ; 
}


//====================================================================================
function FormErrorHighlight(Obj)
{
	Obj.style.backgroundColor="yellow" ; 
}

//====================================================================================
function FormErrorRefresh(Obj)
{
	Obj.style.backgroundColor="" ; 
}


//====================================================================================
function DeluxCheck(ID)
{
	var col  = $$("col_"+ID)  ; 
	var tick = $$("tick_"+ID) ; 
	var boxx = $$(ID) ; 
	
	//Chencing the value...
	if(boxx.value==1)
		boxx.value = 0 ; 
	else
		boxx.value = 1 ; 
		
		
	//Changing the others...
	if(boxx.value==1) {
		tick.src = "Images/tick16.gif" ; 
		col.bgColor = "#FFFF77" ; 
	}
	else{
		tick.src = "Images/box16.gif" ; 
		col.bgColor = "#EEEEEE" ; 
	}
}


//====================================================================================
function WinPop( vFileStream )
{
	window.open(vFileStream , "subWindow" , "dependent,height=600,width=850,left=50,top=50,scrollbars,status,") ;
}

//====================================================================================
function WinOpen( vFileStream )
{
	window.open(vFileStream) ;
}

