
function addFavAuth(b,a){new Ajax.Request("/add_to_fav_auth.php",{method:"post",postBody:"auth_id="+b+"&quote_id="+a,onComplete:function(c){showAuthor(c)}})}
function showAlert(){
jQuery(document).ready( function(){
var msg = 'Copied to your clipboard';
jQuery("#modalbody").text(msg);
var animStyle = 'slide';
jQuery('#msg1').notificationmsg({animation:animStyle});
jQuery('#msg1').notificationmsg('show');
});
}
function openBookmarkLogin(a){window.location.href='/loginTwitter.php?bookmarkid='+a;}
var bookmarkVal = 1; 
function changeme(chgval){ 
if(chgval == 1){ 
bookmarkVal = 1; 
}else{ 
bookmarkVal = 0; 
}
} 
function postbookmark(b) {
	if(bookmarkVal == 1) {
		new Ajax.Request("/twitterBookmark.php",{method:"post",postBody:"quotation_id="+b})
	} 
}
function addFav(a){
	new Ajax.Request("/add_to_fav.php",{method:"post",postBody:"quotation_id="+a,onComplete:function(b){
	
	document.getElementById("bookmarklink"+ a ).style.color = '#777777';
	document.getElementById("bookmarklink"+ a ).style.cursor="default";
	var msg = 'Bookmarked successfully';
	jQuery("#bookmarkmodalbody").text(msg);
	var animStyle = 'slide';
	jQuery('#bookmarkmsg1').notificationmsg({animation:animStyle});
	jQuery('#bookmarkmsg1').notificationmsg('show');window.setTimeout("postbookmark(" + a + ")", 7000);
	showQuote(b)}})}



function showAuthor(a){if(a.responseText!=""){showdiv(a.responseText);changeIt("plus.png","imageauth"+a.responseText)}else{hidediv(a.responseText)}}

function showQuote(a){if(a.responseText!=""){
	
	showdiv(a.responseText);changeIt("plus.png","imagequote"+a.responseText)}else{hidediv(a.responseText)}}

function hidediv(a){if(document.getElementById){document.getElementById("hideshow"+a).style.visibility="hidden"}else{if(document.layers){document.hideshow.visibility="hidden"}else{document.all.hideshow.style.visibility="hidden"}}}
function showdiv(a){if(document.getElementById){document.getElementById("hideshow"+a).style.visibility="visible";setTimeout("hidediv("+a+")",1000)}else{if(document.layers){document.hideshow.visibility="visible";setTimeout("hidediv("+a+")",1000)}else{document.all.hideshow.style.visibility="visible";setTimeout("hidediv("+a+")",1000)}}}

function changeIt(a,c){var d=document.getElementById(c);var b="<img src='/images_web/"+a+"' border='0' />";d.innerHTML=b;return}

function copy_to_clipboard(a){if(window.clipboardData){window.clipboardData.setData("text",a)}else{var b=document.getElementById("divclipboardswf");if(b==null){b=document.createElement("div");b.setAttribute("name","divclipboardswf");b.setAttribute("id","divclipboardswf");document.body.appendChild(b)}b.innerHTML='<embed src="clipboard.swf" FlashVars="clipboard='+encodeURIComponent(a)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'}alert("The text is copied to your clipboard...");return false}function update_quotes(){$("progress").show();$("error").hide();new Ajax.Updater("quotes","post_quote.php",{method:"post",parameters:$("postquote").serialize(),insertion:Insertion.Top,onSuccess:function(){$("quote").value="";$("first_name").value="";$("last_name").value="";$("progress").hide()}})}function openShareWindow(a){jQuery(document).ready(function(){url="/sendtofriend.php?height=710&width=1000&filename="+a+"&amp;keepThis=true&amp;TB_iframe=true&modal=true";tb_show("",url,"")})}function eMailCard(a,b){jQuery(document).ready(function(){url="/eMailCard.php?height=710&width=1000&quote_id="+b+"&amp;keepThis=true&amp;TB_iframe=true&modal=true";tb_show("",url,"")})}function openEcardWindow(a,b,e,d,c){jQuery(document).ready(function(){url="/ecard_creator.php?height=605&width=900&searchType="+a+"&quote_id="+b+"&secure="+e+"&searchQuery="+d+"&authorSearched="+c+"&amp;keepThis=true&amp;TB_iframe=true&modal=true";tb_show("",url,"")})}function openEmailWindow(d,b,c,a){Modalbox.show("/email_quote.php",{title:"",width:550,params:{author:d,quote_id:b,return_url:c,filename:a}});return false}function openTagEmailWindow(d,b,c,a){Modalbox.show("/email_tag_video.php",{title:"",width:550,params:{video_title:d,video_link:b,return_url:c,filename:a}});return false}function openLoginWindow(){url="/login.php?height=200";tb_show("",url,"");return false}function openMenuWindow(e,c,d,b,a,f,g){Modalbox.show("/Menu2/ScrollWithoutEcard.php",{title:"",width:940,params:{author:e,author_id:c,icon:d,script:b,quote:a,tag:f}});return false}function openTwitterWindow(a){Modalbox.show("/twitter_login.php",{title:"",width:420,height:200,params:{quote_id:a}});return false}/*function openTwitterWindow(a){jQuery(document).ready(function(){url="/twitter_login.php?height=850&width=900&quote_id="+a+"&amp;keepThis=true&amp;TB_iframe=true&modal=true";tb_show("",url,"")})}*//*function openFbWindow(a){jQuery(document).ready(function(){url="/facebook_login.php?height=200&width=420&quote_id="+a+"&amp;keepThis=true&amp;TB_iframe=true&modal=true";tb_show("",url,"")})}*/function openUserTwitterWindow(a){Modalbox.show("/userquote_twit.php",{title:"",width:420,params:{id:a}});return false}/*function userReTweet(a){Modalbox.show("/userquote_twit.php",{title:"",width:420,params:{quote_id:a}});return false}*//*function openVideo(){Modalbox.show("/home_player.php",{title:"",width:590,height:407});return false}*/function openVideo(){jQuery(document).ready(function(){url="/home_player.php?height=650&width=600&amp;keepThis=true&amp;TB_iframe=true&modal=true";tb_show("",url,"")})}function errorReport(){jQuery(document).ready(function(){url="/errorReport.php?height=650&width=600&amp;keepThis=true&amp;TB_iframe=true&modal=true";tb_show("",url,"")})}function openWallpaperWindow(d,b,a,c,subject){Modalbox.show("/QBImageWithIcon/create_wallpaper.php",{title:"",width:1000,params:{author:d,icon:c,author_id:b,quote:a,tag:subject}});return false}function loaded(){var a=document.getElementsByName("thickbox");for(i=0;i<a.length;i++){a[i].style.visibility="visible"}};