function bookmarkme(title, url)
{
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}


function copyClip(elementID) {
  object=document.getElementById(elementID);
  text2copy=object.value;
  if (window.clipboardData) {
    window.clipboardData.setData("Text",text2copy);
  } else {
    var flashcopier = 'flashcopier';
    if(!document.getElementById(flashcopier)) {
      var divholder = document.createElement('div');
      divholder.id = flashcopier;
      document.body.appendChild(divholder);
    }
    document.getElementById(flashcopier).innerHTML = '';
    var divinfo = '<embed src="/images/_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
    document.getElementById(flashcopier).innerHTML = divinfo;
  }
}

function DelayMe(dName) {
	setTimeout(
			   function(){ getSuggestedDiplomaName(dName)}
			   , 5000);
	//setTimeout("getSuggestedDiplomaName("+dName+")", 5000);	
}

function getSuggestedDiplomaName(dName) {
	//window.alert(dName);
	pars = "&newDiplomaName="+dName;
	url = '/includes/ajax.php';
	if($('ajaxIndicator')) {
		$('ajaxIndicator').remove();
	}
	//$('alertHolderTR').style.display = "none";
	var rand = Math.random(9999);
	var pars = pars+'&action=checkDiplomaName'+"&rand="+rand;
	req = new Ajax.Request(url, {method:'post', parameters:pars,
						   
						   onCreate: function() {
							   if($('ajaxIndicator')) {
									$('ajaxIndicator').remove();
								}
								
						   },
						   onComplete : function() {
							   if($('ajaxIndicator')) {
									$('ajaxIndicator').remove();
								}
						   },
						     onInteractive : function() {
							   if($('ajaxIndicator')) {
									$('ajaxIndicator').remove();
								}
						   },
						   
						   onFailure : function() {
							   if($('ajaxIndicator')) {
									$('ajaxIndicator').remove();
								}
						   },
						   
						   onLoading: function() {
							   	if($('ajaxIndicator')) {
									$('ajaxIndicator').remove();
								}
								
							   	var ajaxImage = new Element( 'img',{ id: "ajaxIndicator" } );
								ajaxImage.src = '/images/ajax.gif'
								ajaxImage.width = "12";
								ajaxImage.height = "12";
  								Element.insert( $('FullName'), {'after':ajaxImage} );
										
							 // $('FullName').next('span').innerHTML = "&nbsp;<img src=>"; 
						   },
						   onComplete: function(request) {
							   		//window.alert(request.responseText)
									
									if($('ajaxIndicator')) {
											$('ajaxIndicator').remove();
									}
									
							   		if(request.responseText!=""){
										
										if($('suggestAlert')) {
											$('suggestAlert').update(request.responseText);
										} else {
											var newAlert = new Element( 'p' ,{ id: "suggestAlert" });
											newAlert.className = "suggest";
											newAlert.update(request.responseText);
											$('sss').update(newAlert);
										}
										$('kkk').show();
									} else if(request.responseText==""){
										
										$('kkk').hide();
										if($('suggestAlert')) {
											$('suggestAlert').remove();
										}
										
										
									}
								if (Ajax.activeRequestCount < 0) {
   									 Ajax.activeRequestCount = 0;
								}   		
						   }
						   });	
	
}