<!--

function PokeToForm(id, formitem){

document.getElementById(formitem).value = "";

var content = document.getElementById(id).innerHTML; 
document.getElementById(formitem).value = content;
document.getElementById(formitem).focus();
tt_HideInit();
return;
}

function GetLocalTimeOffset(){
var rightNow = new Date();
var date1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0);
var temp = date1.toUTCString();
var date2 = new Date(temp.substring(0, temp.lastIndexOf(" ")-1));
var hoursDiffUTCTime = (date1 - date2) / (1000 * 60 * 60);
createTimeOffsetCookie("hoursDiffUTCTime", hoursDiffUTCTime, 0);
}

function createTimeOffsetCookie(name,value,days) {
	if (days && days > 0) {
	var date = new Date();
	date.setTime(date.getTime()+(days*24*60*60*1000));
	var expires = "; expires="+date.toUTCString();}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function imposeMaxLength(Object, MaxLen)
{return (Object.value.length <= MaxLen);}	



function VendorListGetStarted(mode, BusName){
var str = "<a href=\'javascript:void(0);\' onclick=\'tt_HideInit()\' style=\'float: right;\'><img alt=\'\' src=\'/img/btnCLose.gif\' /></a><b>READY TO GET STARTED?</b><div style=\'margin:10px 0 0 0;font-size:11px;\'>"

if (mode=="FIND")
{  str = str + "It\'s easy to get proposals and quotes from business like "+BusName+", and many others. Our tools help you create great requests, easliy compare responses and find the best providers for your projects.<br /><br />It\'s fast, convenient, 100% free and you\'re in total control."; }
else
{  str = str + "Want to see your name on this list (like "+BusName+") and submit proposals to high value, quality opportunities from business and  government buyers? Our tools help you sell your services and expertise to more buyers more often.<br /><br />It\'s free to signup and receive sales leads and you only pay for proposals you submit!."; }

str = str+"<div style=\'margin:20px 0 10px 0;padding:10px;background:white;border:1px solid gold;\'><a href=\'signup.aspx\' onmouseover=document.getstartedimg.src='/Img/createaccount_on.gif\' onmouseout=document.getstartedimg.src=\'/Img/createaccount_off.gif\'><img src=\'/Img/createaccount_off.gif\' alt=\'\' name=\'getstartedimg\' /></a></div>";

return str;

}


function VendorListPopUp(Avatar,BusDesc)
{
return "<table cellspacing=\'0\' cellpadding=\'0\' border=\'0\'><tr><td valign=\'top\' style=\'padding-right:10px;\'>"+Avatar+"</td><td valign=\'top\'>"+BusDesc+"</td></tr></table>";
}

function ConfirmDeleteAvatar(){
    
   var cVal = false; 
   
   cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete this picture\n\nClick OK to delete.");
   
    if( cVal == true )
    {return true;}
    else
    {return false;}
}


function ConfirmApproveDeclineAvatar(){
    var cVal = false; 
   
   cVal = confirm("WARNING!!!\n\nYou are about to approve and/or decline pictures. Note: CHECKED items will be APPROVED and UNCHECKED items will be PERMANENTLY DELETED FROM THE DATABASE.\n\nClick OK to continue.");
   
    if( cVal == true )
    {return true;}
    else
    {return false;}
   } 

function ConfirmDelete(r){
   var cVal = false; 
   
   if (r =="delAllAlerts")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete all your alerts?\n\nWhilst this action cannot be undone, you can add these alerts (and more) again.\n\nClick OK to delete.");}
   else if (r =="delAllCountryAlerts")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete all alerts for this country?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
   
   
   else if (r =="delAllOpportunityCategories")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete categories of expertise for this opportunity?\n\nWhilst this action cannot be undone, you can add these locations again.\n\nClick OK to delete.");}
   else if (r =="delAllOpportunityCategoriesParents")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete this category of expertise for this opportunity?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
   
   else if (r =="delAllOpportunityLocations")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete locations for this opportunity?\n\nWhilst this action cannot be undone, you can add these locations again.\n\nClick OK to delete.");}
   else if (r =="delAllOpportunityCountryLocations")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete all this country?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
   
   else if (r =="delAllOpportunityQuestions")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete all these questions?\n\nWhilst this action cannot be undone, you can add these questions again.\n\nClick OK to delete.");}
   
     else if (r =="delAllOpportunityQuestionsNotAnswered")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete all these questions?\n\nNote: As this opportunity has active responses, only those questions not yet answered will be deleted.\n\nClick OK to delete.");}
     
   
   else if (r =="delResponse")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete your response?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
   
   else if (r =="delResponseRecoverCredit")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete your response?\n\nThis action cannot be undone!.\n\nNOTE: You will recover the response credit(s) charged for this response.\n\nClick OK to delete.");}
   
   else if (r =="delRequest")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete this request?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
   else if (r =="delPanel")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete this Panel?\n\nThis will also delete all associated members and messages and will remove it from other members if shared.\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
   else if (r =="delSharedPanel")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete this Shared Panel?\n\nDeleting will only remove this panel from your list. It will not remove the panel and/or members from the system as it is controlled by another.\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
   else if (r =="delSharedPanelMember")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete profile from this Shared Panel?\n\nThis profile will no longer have access to this shared panel or members.\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
     
    else if (r =="delInvitee")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete this Invitee?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
     else if (r =="delAllInvitees")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete all your Invitees?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
    else if (r =="delMember")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete this Panel Member?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
     else if (r =="delAllMembers")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete all your Panel Members?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
    else if (r =="delMeFromPanel")
   
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete yourself from this Preferred Provider Panel?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
     else if (r =="delAffiliateChannel")
   {cVal = confirm("IMPORTANT - PLEASE READ:\n\nAre you sure you wish to delete the Channel?\n\nThis action cannot be undone!\n\nClick OK to delete.");}
    else if (r =="delAffiliateAd")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete this Ad?\n\nThis action cannot be undone!.\n\nClick OK to delete.");}
    else if (r =="delAlertResult")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete this lead?\n\nThis action cannot be undone and you cannot recover this lead.\n\nClick OK to delete.");}
    else if (r =="delAllAlertResult")
   {cVal = confirm("WARNING!!!\n\nAre you sure you wish to delete ALL these leads?\n\nThis action cannot be undone and you cannot recover these leads.\n\nClick OK to delete.");}  
   
    if( cVal == true )
    {return true;}
    else
    {return false;}
	
}

function ConfirmSubmit(r){
   var cVal = false; 
   
   if (r =="conFirmAddResponseWithCredits")
   {cVal = confirm("IMPORTANT!!!\n\nYou are about to submit a proposal to a request for expertise.\n\nWe will draw down the indicated number of response credits from your account.\n\nPlease read the following statement...\n\nBY RESPONDING TO THIS REQUEST, I GIVE PERMISSION (AS PER THE TERMS AND CONDITIONS OF USE) FOR MY RELEVANT CONTACT DETAILS TO BE MADE AVAILABLE TO THE POSTING PARTY WHEN APPLICABLE. I UNDERSTAND AND AGREE THAT THESE DETAILS MAY INCLUDE (AMONGST OTHERS) MY NAME, BUSINESS DETAILS, PHONE, FAX, EMAIL ADDRESS AND OTHER CONTACT DETAILS.\n\nIf you agree with the above statement, click OK to submit your response.\n\nIf not, please click CANCEL.");}
     else if (r =="conFirmResponseInvitation")
   {cVal = confirm("IMPORTANT!!!\n\nYou are about to invite this respondant to contact you.\n\nThis will provide the respondant with your contact details, including phone and email address.\n\nPrior to doing this, please read the following statement...\n\nBY INVITING THIS RESPONDANT TO CONTACT ME, I GIVE PERMISSION (AS PER THE TERMS AND CONDITIONS OF USE) FOR MY RELEVANT CONTACT DETAILS TO BE MADE AVAILABLE TO THE RESPONDING PARTY. I UNDERSTAND AND AGREE THAT THESE DETAILS MAY INCLUDE (AMONGST OTHERS) MY NAME, BUSINESS DETAILS, PHONE, FAX, EMAIL ADDRESS AND OTHER CONTACT DETAILS.\n\nIf you agree with the above statement, click OK to invite this respondant to contact you.\n\nIf not, please click CANCEL.");}
     else if (r =="conFirmAddResponseWithOutCredits")
   {cVal = confirm("IMPORTANT!!!\n\nYou are about to submit a proposal to a request for expertise.\n\nAs you have insufficient response credits on your account, you will be directed to our secure payment page where you can purchase the required number of credits.\n\nPlease read the following statement...\n\nBY RESPONDING TO THIS REQUEST, I GIVE PERMISSION (AS PER THE TERMS AND CONDITIONS OF USE) FOR MY RELEVANT CONTACT DETAILS TO BE MADE AVAILABLE TO THE POSTING PARTY WHEN APPLICABLE. I UNDERSTAND AND AGREE THAT THESE DETAILS MAY INCLUDE (AMONGST OTHERS) MY NAME, BUSINESS DETAILS, PHONE, FAX, EMAIL ADDRESS AND OTHER CONTACT DETAILS.\n\nIf you agree with the above statement, click OK. Once you have purchased credits, this response will be automatically submitted.\n\nClick OK to continue to payment page.");}
else if (r =="conFirmPostRequest")
   {cVal = confirm("IMPORTANT!!\n\nYou are about to Save and Post this request. Other businesses will be able to view it and respond to it.\n\nPrior to doing this, please read the following statement...\n\nBY SAVING AND POSTING THIS REQUEST FOR EXPERTISE, I AGREE, WARRANT AND CONFIRM THAT THIS IS A LEGITIMATE REQUEST, AND WHILST I AM NOT OBLIGATED TO PURCHASE, I HAVE THE INTENTION OF PURCHASING THE SERVICES AS ENTERED AND DESCRIBED.\n\nI FURTHER UNDERSTAND THAT THOSE WHO RESPOND TO THIS REQUEST MAY BE REQUIRED TO PAY A FEE TO DO SO, AND AS SUCH I HAVE PROVIDED (TO THE BEST OF MY KNOWLEDGE) ALL AVAILABLE INFORMATION (INCLUDING ACCURATE AND CURRENT CONTACT INFORMATION) TO ASSIST THEM IN MAKING AN INFORMED DECISION AS TO (1) WHETHER TO RESPOND OR NOT, AND (2) IF RESPONDING, SUFFICIENT RELEVANT INFORMATION TO ALLOW A SUITABLE RESPONSE TO BE MADE.\n\nIf you agree with the above statement, click OK to save and post this request.\n\nIf not, please click CANCEL.");}
   
else if (r =="conFirmAddTemplate")
{cVal = confirm("Please Confirm!!\n\nYou are about to save this template.\n\nIMPORTANT : This template WILL BE USED AS YOUR FEEDBACK TO THE RESPONDENT as to why you have declined their response.\n\nIf you agree with the above statement, click OK to save this template and decline this response.\n\nIf not, please click CANCEL.");}

else if (r =="conFirmAddCredit")
{cVal = confirm("Please Confirm!!\n\nYou are sure you wish to add response credits to this account?\n\nIf not, please click CANCEL.");}

else if (r =="conFirmRemoveCredit")
{cVal = confirm("Please Confirm!!\n\nYou are sure you wish to remove response credits from this account?\n\nIf not, please click CANCEL.");}
   
    if( cVal == true )
		{return true;}
	else
		{return false;}
	
}


function AlertMode(r){

if (r =="delAffiliateChannel")
   {cVal = alert("IMPORTANT - PLEASE READ:\n\nYou cannot delete this channel as you have members associated with it.\n\nIf you no longer require this channel, we recommend you replace or remove any codes on your web site(s) that are associated with this channel.\n\n");}
   else if (r =="delRequestNotValid")
   {cVal = alert("PLEASE NOTE:\n\nYou cannot delete this request as there\nresponses that require your attention.\n\nPlease process each response you have received\nfor this request to allow deletion.");}
 
}

		
	
function popUp(URL){

w=780;
h=600;
day = new Date();
id = day.getTime();
LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,statusbar=0,menubar=no,toolbar=no,resizable=1';

eval("page" + id + " = window.open(URL, '" + id + "',settings);");
return false;

}


function popUpMid(URL){

w=560;
h=500;
day = new Date();
id = day.getTime();
LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,statusbar=0,menubar=no,toolbar=no,resizable=1';

eval("page" + id + " = window.open(URL, '" + id + "',settings);");
return false;

}

function popUpInvoice(URL){

w=780;
h=600;
day = new Date();
id = day.getTime();
LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,statusbar=0,menubar=no,toolbar=no,resizable=1';

eval("page" + id + " = window.open(URL, '" + id + "',settings);");
return false;

}

function popUpForPrint(URL){

w=780;
h=600;
day = new Date();
id = day.getTime();
LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,statusbar=0,menubar=no,toolbar=no,resizable=1';

eval("page" + id + " = window.open(URL, '" + id + "',settings);");
return false;

}




function starRating(responseId,setUrl, setQs){

return "<div id='sr"+responseId+"' visible='false'><div style='background:white;border:1px solid gold;padding:10px;'>&nbsp;SET RATING<hr /><a href='"+setUrl+"&asr=0&asrId="+responseId+setQs+"'><img src='/img/s0.gif' alt='' style='margin:0 0 3px 0;' /></a><br /><a href='"+setUrl+"&asr=1&asrId="+responseId+setQs+"'><img src='/img/s1.gif' alt='' style='margin:0 0 3px 0;' /></a><br /><a href='"+setUrl+"&asr=2&asrId="+responseId+setQs+"'><img src='/img/s2.gif' alt='' style='margin:0 0 3px 0;' /></a><br /><a href='"+setUrl+"&asr=3&asrId="+responseId+setQs+"'><img src='/img/s3.gif' alt='' style='margin:0 0 3px 0;' /></a><br /><a href='"+setUrl+"&asr=4&asrId="+responseId+setQs+"'><img src='/img/s4.gif' alt='' style='margin:0 0 3px 0;' /></a><br /><a href='"+setUrl+"&asr=5&asrId="+responseId+setQs+"'><img src='/img/s5.gif' alt='' style='margin:0 0 3px 0;' /></a><br /><hr /><a href='javascript:void(0);' onclick='tt_HideInit()'>close</a></div></div>";

}



/***********************************************
* Form Field Progress Bar- By Ron Jonk- http://www.euronet.nl/~jonkr/
* Modified by Dynamic Drive for minor changes
* Script featured/ available at Dynamic Drive- http://www.dynamicdrive.com
* Please keep this notice intact
***********************************************/

function textCounter(field,counter,maxlimit,linecounter) {
	// text width//
	var fieldWidth =  parseInt(field.offsetWidth);
	var charcnt = field.value.length;        

	// trim the extra text
	if (charcnt > maxlimit) { 
		field.value = field.value.substring(0, maxlimit);
	}

	else { 
	// progress bar percentage
	var percentage = parseInt(100 - (( maxlimit - charcnt) * 100)/maxlimit) ;
	document.getElementById(counter).style.width =  parseInt((fieldWidth*percentage)/100)+"px";
	
	if (percentage >29){
		document.getElementById(counter).innerHTML="&nbsp;Used : "+percentage+"%"
		setProgressHeight(document.getElementById(counter),13,"height");
		setcolor(document.getElementById(counter),percentage,"background-color");
		}
		else{
			document.getElementById(counter).innerHTML=""
			setProgressHeight(document.getElementById(counter),0,"height");
		}
	}
}

function setcolor(obj,percentage,prop){obj.style[prop] = "rgb(80%,"+(100-percentage)+"%,"+(100-percentage)+"%)";}
function setProgressHeight(obj,height,prop){obj.style[prop] = height+"px";}


//-->






