$(document).ready(function(){
		
	// Find the login link and set it to call the javascript function (default is the actual login page if no javascript)
	var elm = document.getElementById("login-link");
	if(elm)
	{
		elm.href = "javascript:toggle_login();";
	}

});

function toggle_login()
{
	$("#login_container").toggle();
}

function process_divlimit325chars(strElementName, strDivName, iCharLimit)
{
	areaLimitDiv = document.getElementById(strElementName);
	document.getElementById(strDivName).innerHTML='('+(iCharLimit-areaLimitDiv.value.length)+' characters remaining)';
	if(areaLimitDiv.value.length > iCharLimit) {
    document.getElementById(strDivName).innerHTML='<b style="font-weight:normal;color:red;font-size:9px;">(Over limit, description shortened to 325 characters)</b>';
		areaLimitDiv.value = areaLimitDiv.value.substring(0, iCharLimit);
  }
}
function showUpload(divName) {
// document.getElementById(divName).innerHTML='<img src=/100ways/images/enter/video_upload_spin.gif border=0>'; 
//  document.getElementById(divName).innerHTML='<center><img src="http://popart.pringles.com/100ways/images/enter/video_upload_spin_6.gif" width="116" height="117" border="0" style="display:block;visibility:show;"></center><input name="token" type="hidden" value="<?php echo $tokenValue ?>" />'; 
  document.getElementById(divName).innerHTML='<center><b style="font-weight:normal;color:red;font-size:12px;">Please stand by while your photo/video is processed and uploaded.</b></center><input name="token" type="hidden" value="<?php echo $tokenValue ?>" />';
}
