function opacity(id, opacStart, opacEnd, millisec) { 
	//code from http://brainerror.net/scripts/javascript/blendtrans/
    //speed for each frame 
    //alert(id);

    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        //alert("down "+id);
        for(i = opacStart; i >= opacEnd; i--) { 
        	
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
	    //alert("up "+id);
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
	//code from http://brainerror.net/scripts/javascript/blendtrans/
//	alert (id);
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 

}
function pausecomp(millis) 
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); } 
while(curDate-date < millis);
}

function rotate_cv_image(){
	if (window.current_image==window.cvs){
		window.current_image=1;
	}else{
		window.current_image++;
	}
	
	setTimeout("window.cvi.src='/pages/cv/images/cv"+window.current_image+".jpg';",701);
	opacity('cvimage', 100, 0, 700);
	setTimeout("opacity('cvimage',0,100,700);",750);
	

}