function ajaxwindowinvitefreinds(loan_id)
{   
    var width = 650;
    var height =475;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
        ajaxwin=dhtmlmodal.open("ajaxbox3", "ajax", "/myaccount/invite_friends?loan_id="+loan_id+"", "Invite_Friends", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   

}	 

function ajaxPhotoDisplay(id)
{
var width = 700;
    var height =650;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
    ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/classifieds/full_photo?id="+id+"", "Classified_Photo", "status = no, width="+width+", height="+height+",  left="+left+", top=150,scrolling=1") ;   

}

function ajaxRespondClassified(id)
{   
    var width = 700;
    var height =400;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
    ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/classifieds/respond?id="+id+"", "Respond_to_Classified", "status = no, width="+width+", height="+height+",  left="+left+", top=150,scrolling=1") ;   

}	
function ajaxCommentReply(id)
{   
    var width = 700;
    var height =400;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
    ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/classifieds/comment_reply?id="+id+"", "Reply_to_Comment", "status = no, width="+width+", height="+height+",  left="+left+", top=150,scrolling=1") ;   

}	

function ajaxClassifiedWikinvite(id)
{   
    var width = 700;
    var height =425;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
    ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/classifieds/wikinvite?id="+id+"", "WikInvite", "status = no, width="+width+", height="+height+",  left="+left+", top=150,scrolling=1") ;   

}	


function ajaxwintellafriend()
{   
    var width = 650;
    var height =500;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
    ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/myaccount/tellafriend", "Invite_Friends", "status = no, width="+width+", height="+height+",  left="+left+", top=150,scrolling=1") ;   

}	 
 
 function ajaxwindow_schedulepayment(loan_id)
{   
    var width = 425;
    var height =400;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
    ajaxwin=dhtmlmodal.open("ajaxbox4", "ajax", "/myaccount/schedulepayment?loan_id="+loan_id+"", "Schedule_Payment", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   

}

 function ajaxwindow_operating()
{   
    var width = 500;
    var height =400;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
    ajaxwin=dhtmlmodal.open("ajaxbox4", "ajax", "/getaloan/operatingIn", "Wikiloan", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   

}







function payment_creditcard_popup(amt)
{   
	
	
    var width = 550;
     var height = 490;
     var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
	if(typeof( creditCardInfo ) != 'undefined')
	{
	loopid=setInterval('getCreditCardInfo()',1000)
	}
	
	ajaxwin=dhtmlmodal.open("ajaxbox1", "ajax", "/myaccount/payment_creditcard_popup?amount="+amt+"", "Credit_Card_Details", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   
	
}	 
function payment_echeck_popup(amt)
{   

	var width = 750;
    var height = 450;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
	if(typeof(echeckInfo) != 'undefined')
	{
	loopid1=setInterval('getEcheckInfo()',1000);
	}
	
	ajaxwin=dhtmlmodal.open("ajaxbox2", "ajax", "/myaccount/payment_echeck_popup?amount="+amt+"", "Echeck_Details", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   
	
	

}	 

function ajaxwindowtermsofuse()
{   
	//ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "/main/terms_of_use", "Terms of Use", " width=500px, height=500px,  left=10px, top=35px,") 

	var width = 720;
    var height = 480;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/main/terms_of_use", "Terms_of_Use", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   

}	 

function ajaxwindowelectronicdisclosure()
{
	var width = 720;
    var height = 480;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/main/electronic_disclosure", "Electronic_Disclosure", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   

}

function ajaxwindowprivacypolicy()
{
	var width = 720;
    var height = 480;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/main/privacy", "Privacy_Policy", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   

}

function ajaxwindowhowitworks(context)
{
	if(context=='lend_borrow')
	{
    var width = 850;
    var height = 575;
	}else
	{
     var width =450;
    var height = 300;
	}
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	window.open("/main/ajaxhowitworks?i="+context, "What_we_do", "status = no, width="+width+", height="+height+",  left="+left+", top=100,scrolling=1") ;   

}

function ajaxwindow_cdoctor_termsofuse(context)
{
	var width = 720;
    var height = 480;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/main/ajax_cdoctor_termsofuse?i="+context, "Credit_Doctor_Terms_of_Use", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   
}



function ajaxwindownews(val)
{
	var width = 720;
    var height = 480;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/main/news_detail?article="+val, "News", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   
}

function ajaxwinTermsofUsePdf(val)
{
	var width = 800;
    var height = 600;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
	window.open("/data/pdfdocs/termsofuse.pdf", "Terms_of_Use","status = no, width="+width+", height="+height+", left="+left+", top=35,scrolling=1");   

}

function ajaxwinPrivacyPolicyPdf(val)
{
	var width = 800;
    var height = 600;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 
	window.open("/data/pdfdocs/privacydisclosures.pdf", "Privacy_Policy","status = no, width="+width+", height="+height+", left="+left+", top=35,scrolling=1");   

}

function ajaxwindow_confirm_agree_ajax(val,loan_id)
{ 
	var width = 720;
    var height = 480;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/getaloan/confirm_agree_ajax?data="+val+"&loan_id="+loan_id, "Confirm_Agreement", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   
}

function ajaxwindow_loanstatus(val)
{   
	var width = 250;
    var height = 150;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/myaccount/myloan_status?status_msg="+val, "Loan_Status", "status = no, width="+width+", height="+height+",  left="+left+", top=100,scrolling=1") ;   
}




function ajaxwindow_wikiscore(val,score,grade)
{   
	var width = 500;
    var height = 250;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/myaccount/wikiscoreformula?creditreport_paymentdetails_id="+val+"&score="+score+"&grade="+grade, "WikiScore_and_Formula", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   
}

/***************************************************/
/* Admin panel ajax site content				   */
/**************************************************/
 
function ajaxwndw_admin_sitecontent(news_title,news_id,controlarrayid,menutitle)
{  
	var width = 800;
    var height = 500;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5));   
	
	if(news_title == 'news_title')
	{
		subheadlinetitle = "Title";
	}
	else if(news_title == 'news_data')
	{
		subheadlinetitle = "Data";
	}
	else if(news_title =='summary')
	{
		subheadlinetitle = "Summary";
	}
	else if(news_title =='short_message')
	{
		subheadlinetitle = "Short Message";
	}
	else if(news_title =='main_content')
	{
		subheadlinetitle = "Main Content";
	}
	else if(news_title == 'date_givenby_admin')
	{
		subheadlinetitle = "Date";
	} 
	
	var ajaxhedline = menutitle+"->"+subheadlinetitle;  

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "../admin/fck_edit.php?field="+news_title+"&nid="+news_id+"&ctlarrayid="+controlarrayid, ajaxhedline, "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   
}

/***************************************************/
/* Admin panel ajax email content				   */
/**************************************************/
 
function ajaxwndw_admin_emailcontent(email_edit,email_template_id,email_cat_id,menutitle)
{  
	var width = 800;
    var height = 500;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5));   
	 
	if( email_edit== 'email_context')
	{
		subheadlinetitle = "eMail Context";
	}
	else if(email_edit == 'email_subject')
	{
		subheadlinetitle = "eMail Subject";
	}
	else if( email_edit=='email_body')
	{
		subheadlinetitle = "eMail Body";
	}
	else if( email_edit== 'email_from')
	{
		subheadlinetitle = "eMail From";
	} 
	
	var ajaxhedline = menutitle+"->"+subheadlinetitle;  

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "../admin/fck_edit.php?field="+email_edit+"&nid="+email_template_id+"&email_cat_id="+email_cat_id, ajaxhedline, "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;   
}

function ajaxwinAddBankAccount()
{
	var width = 530;
    var height = 670;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/myaccount/add_bankaccount", "Add_Bank_Account", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;      

}

function update_bankaccount(bankid)
{
	var width = 530;
    var height = 670;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/5)); 

	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/myaccount/update_bankaccount?id="+bankid, "Edit_Bank_Account", "status = no, width="+width+", height="+height+",  left="+left+", top=35,scrolling=1") ;      

}


function transfer_fundspopup()
{
	var width = 960;
    var height = 280;
    var left = parseInt((screen.availWidth/2) - (width/2));
    //var top = parseInt((screen.availHeight/2) - (height/5)); 
	 
	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/myaccount/transferfunds_popup", "Transfer_Funds", "status = no, width="+width+", height="+height+",  left="+left+", top=150,scrolling=1") ;      

}



function getUsuryLaw(stateName)
{
    var width = 650;
    var height = 350;
    var left = parseInt((screen.availWidth/2) - (width/2));
    //var top = parseInt((screen.availHeight/2) - (height/5)); 
	 
	ajaxwin=dhtmlmodal.open("ajaxbox", "ajax", "/getaloan/usuryLaw?state="+stateName, "Usury_Law", "status = no, width="+width+", height="+height+",  left="+left+", top=150,scrolling=1") ;      

}

 
