﻿function changtabDiv(sender,tab,doc,div) {
	$("li[@name='"+tab+"']").each(function(i) {
			this.className = "";
			if(i != 7){
                this.className = "rightLine";
			}
            })
	
    $(sender).parent().attr("className", "cur");
	
	$("div[@name='"+doc+"']").each(function(i) {
		this.style.display = "none";
	})
	$("#" + div + "_" + sender.id )[0].style.display = "";
}
function changtabTable(sender,tab,doc,div) {
	$("td[@name='"+tab+"']").each(function(i) {
                this.className = "menuout";
            })
	
    $(sender).parent().attr("className", "menuover");
	
	$("div[@name='"+doc+"']").each(function(i) {
		this.style.display = "none";
	})
	$("#" + div + "_" + sender.id )[0].style.display = "";
}// JavaScript Document
function fPopUpDlg(endtarget,ctl,WINname,WINwidth,WINheight){
	
	showx =  WINwidth + 200  ; // + deltaX;
	showy = WINheight ; // + deltaY;
	

	newWINwidth = WINwidth + 4 + 18;
	var features =
		'dialogWidth:'  + newWINwidth  + 'px;' +
		'dialogHeight:' + WINheight + 'px;' +
		'dialogLeft:'   + showx     + 'px;' +
		'dialogTop:'    + showy     + 'px;' +
		'directories:no; localtion:no; menubar:no; status=no; toolbar=no;scrollbars:yes;Resizeable=no';
	

	
	retval = window.showModalDialog(endtarget, WINname , features );
	if( retval != null ){
		ctl.value = retval;
	}else{
		//alert("canceled");
	}
}
function clean(){ 
var aa = document.getElementsByTagName("input") 
for(var i=0;i<aa.length;i++){ 
if (aa[i].type=="text"){ 
aa[i].value=""; 
} 
} 
} 
