function doUnderline(Obj, Setting) {
    if (Setting)
        Obj.style.textDecoration = 'underline';
    else
        Obj.style.textDecoration = 'none';
}

function showON(id) {
	try{
    	$(id).style.display = '';
	}catch(e){}
}
function showOFF(id) {
	try{
    	$(id).style.display = 'none';
    }catch(e){}
}


function removeUnderline(Obj, Setting) {
    if (Setting)
        Obj.style.textDecoration = 'none';
    else
        Obj.style.textDecoration = 'underline';
}
// Use this to know the browser name
function detectBrowserName() {
	var browserName=navigator.appName; 
	if (browserName=="Netscape") 
		 return "Netscape";
	else if (browserName=="Microsoft Internet Explorer")
		return "IE";
	else 
		return "others";				   	
}
//This function returns the data after inserting word breaks in it at the specified word length.
function wordWrap(data, wordBreakLength) {
	var str = "";
	var i=0;
	var j=0;
	var wbrString = "";
	var browserName = "";

	browserName = detectBrowserName();
	if ( browserName=="Netscape" || browserName=="IE" )
		wbrString="<wbr>";
	else
		wbrString="&#8203;";
	for(i=wordBreakLength; ;i+=wordBreakLength) {
		if (data.substring(j).length == 0)
			break;
		else if (data.substring(j).length < wordBreakLength) {
			str += data.substring(j);		
			break;			
		} else {
			str += data.substring(j,i) + wbrString;
			j=i;
		}
	}
	return str;
}
function playVideo() {
	document.getElementById('partyLineVideo').style.display = "block";
	document.getElementById('closeVideo').style.display = "block";
}

function closeVideo() {
	document.getElementById('closeVideo').style.display = "none";
	document.getElementById('partyLineVideo').style.display = "none";
	resetVideo('partyLineVideo');
}

function resetVideo(divId) {
  if (typeof(divId)=="string") { divId=document.getElementById(divId); }
  if (divId.innerHTML) {
    org=divId.innerHTML;
    divId.innerHTML='';
    divId.innerHTML=org;
  }
  return false;
}
