var defaultStep=4;
var step=defaultStep;

function scrollDivDown(id){
clearTimeout(timerDown) 
document.getElementById(id).scrollTop+=step 
timerDown=setTimeout("scrollDivDown('"+id+"')",10)
} 

function scrollDivUp(id){
clearTimeout(timerUp)
document.getElementById(id).scrollTop-=step 
timerUp=setTimeout("scrollDivUp('"+id+"')",10)
} 

timerDown="" 
timerUp="" 

function stopMe(){
clearTimeout(timerDown) 
clearTimeout(timerUp)
}	

function telcojump(param){
	$('#telcoM, #telcoT, #telcoC').css("display","none");
	if(param=="telcoM"){
		$('#telcoM').css("display","block");
		$('#telcoM_topcorner').corner("top 12px");
	}else if(param=='telcoT'){
		$('#telcoT').css("display","block");
		$('#telcoT_topcorner').corner("top 12px");
	}else if(param=='telcoC'){
		$('#telcoC').css("display","block");
		$('#telcoC_topcorner').corner("top 12px");
	}
}

function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}

$(function() {   
	$('#top_ps').corner("bottom");
	$('#top_be').corner("bottom");

	$("#clicklang").click(function () {
        var p = $("#clicklang");
		var s = $("#showLang");
        var off=p.offset();
        var cssObj = {
        position: "absolute",
        cursor:"pointer",
		top: off.top+25,
        //top: off.top - (p.height()*1.35),
		left: off.left+5,
		zIndex: 9999
      };
      $("#showLang").css(cssObj);
	  $("#showLang").show();
    }); 
	
	$("#clicklang").mouseout(function () {
       $("#showLang").hide();
    });
    
    $("#showLang").mouseover(function () {
       $("#showLang").show();
    });
	
	$("#showLang").mouseout(function () {
       $("#showLang").hide();
    });
	
	$("#showLang").click(function () {
	   $("#showLang").hide();
    });
	
	$("#clickquicklink").click(function () {
        var p = $("#clickquicklink");
		var s = $("#showQuickLink");
        var off=p.offset();
        var cssObj = {
        position: "absolute",
        cursor:"pointer",
		top: off.top+26,
        //top: off.top - (p.height()*1.35),
		left: off.left+8,
		zIndex: 9999
      };
      $("#showQuickLink").css(cssObj);
	  $("#showQuickLink").show();
    }); 
	
	$("#clickquicklink").mouseout(function () {
       $("#showQuickLink").hide();
    });
    
    $("#showQuickLink").mouseover(function () {
       $("#showQuickLink").show();
    });
	
	$("#showQuickLink").mouseout(function () {
       $("#showQuickLink").hide();
    });
	
	$("#showQuickLink").click(function () {
	   $("#showQuickLink").hide();
    });
     
}); 
