/**
 * modify path of an image 
 */
function flipOn( imgObj, filePath ) {
	imgObj.src = filePath;
	
}

/**
 * help function to extract id from a link such as /index.php?id=3
 */
function extractId( strId ) {
	id = 0;
	arrPar = strId.split( "?" );
	for( i = 0; i < arrPar.length; i++ ) {
		if( arrPar[i].indexOf("id=") >= 0 ) {
			eval( arrPar[i] );
			break;
		}
	}
	return id;
}

/**
 * display arrow of a menu entry.
 * workaround: use list style image and expect link for currentId
 * if id of menu entry and the current id of the document share, then do nothing
 */
function showMenuArrow( listItem, currentLink, activeId ) {
	if( extractId( currentLink ) != activeId ) {
		listItem.style.listStyleImage='url( assets/templates/seeyou/images/piMenuArrowOn.png)';
	}
}

/**
 * display arrow of a menu entry.
 * workaround: use list style image
 * if id of menu entry and the current id of the document share, then do nothing
 */
function hideMenuArrow( listItem, currentLink, activeId ) {
	if( extractId( currentLink ) != activeId ) {
		listItem.style.listStyleImage='url( assets/templates/seeyou/images/piMenuArrowOff.png)';
	}
}
