function DownloadInfo () { } var SignupSelect = false; function Go(Sasan,Nobakht) { Ajax( 'POST' , ''+Sasan+'?'+Nobakht+'' , '' , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); } function MainSwitch( Type,PostData,GetData ) { if (Type != "Categories") $$('Div_SignUp').style.color='#FFFFFF'; if (Type != "Categories") $$('Div_SignUp').style.color='rgb(255, 255, 255)'; if (Type != "Categories") $$('Div_SignUp').style.borderLeft='0px solid #1d4088'; if (Type != "Categories") $$('Div_SignUp').style.borderRight='0px solid #1d4088'; if (Type != "Categories") Hide('Div_SignUp_Main'); if (!Type) Type = ''; if (!PostData) PostData = ''; if (!GetData) GetData = ''; if (Type != "SignUp" && Type != "Categories") $$('CurrentType').value = Type; $$('CurrentPostData').value = PostData; $$('CurrentGetData').value = GetData; Hide('Body_OneSeparate'); Show('Body_TwoSeparate'); if(Type) switch (Type) { case "Home" : $$('Div_Home').style.backgroundColor='#6d86b7'; $$('Div_Home').style.backgroundColor='rgb(109, 134, 183)'; $$('Div_SignUp').style.backgroundColor=''; $$('Div_Groups').style.backgroundColor=''; $$('Div_ContactUs').style.backgroundColor=''; Ajax( 'POST' , 'Home' , '' , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; case "SignUp" : if (!SignupSelect) { $$('Div_SignUp').style.backgroundColor='#FFFFFF'; $$('Div_SignUp').style.backgroundColor='rgb(255, 255, 255)'; $$('Div_SignUp').style.borderLeft='1px solid #1d4088'; $$('Div_SignUp').style.borderRight='1px solid #1d4088'; $$('Div_SignUp').style.color='#444444'; $$('Div_SignUp').style.color='rgb(68, 68, 68)'; SignupSelect = true; Show('Div_SignUp_Main'); Ajax( 'POST' , 'SignUp.php' , '' , 'SignUP_Loader' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'SignUP_Loader' , '' , '70' ); } else { $$('Div_SignUp').style.color='#FFFFFF'; $$('Div_SignUp').style.color='rgb(255, 255, 255)'; $$('Div_SignUp').style.borderLeft='0px solid #1d4088'; $$('Div_SignUp').style.borderRight='0px solid #1d4088'; $$('Div_SignUp').style.backgroundColor='#6d86b7'; $$('Div_SignUp').style.backgroundColor='rgb(109, 134, 183)'; SignupSelect = false; } break; case "Groups" : $$('Div_Home').style.backgroundColor=''; $$('Div_SignUp').style.backgroundColor=''; $$('Div_Groups').style.backgroundColor='#6d86b7'; $$('Div_Groups').style.backgroundColor='rgb(109, 134, 183)'; $$('Div_ContactUs').style.backgroundColor=''; Ajax( 'POST' , 'Group' , '' , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; case "ContactUs" : $$('Div_Home').style.backgroundColor=''; $$('Div_SignUp').style.backgroundColor=''; $$('Div_Groups').style.backgroundColor=''; $$('Div_ContactUs').style.backgroundColor='#6d86b7'; $$('Div_ContactUs').style.backgroundColor='rgb(109, 134, 183)'; Ajax( 'POST' , 'Contact' , '' , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; case "Album" : $$('Div_Home').style.backgroundColor=''; $$('Div_SignUp').style.backgroundColor=''; $$('Div_Groups').style.backgroundColor=''; $$('Div_ContactUs').style.backgroundColor=''; Ajax( 'POST' , 'Album.php?'+GetData+'' , '' , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; case "ArtistAlbums" : $$('Div_Home').style.backgroundColor=''; $$('Div_SignUp').style.backgroundColor=''; $$('Div_Groups').style.backgroundColor=''; $$('Div_ContactUs').style.backgroundColor=''; Ajax( 'POST' , 'Album.php?'+GetData+'' , '' , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; case "Cat" : $$('Div_Home').style.backgroundColor=''; $$('Div_SignUp').style.backgroundColor=''; $$('Div_Groups').style.backgroundColor=''; $$('Div_ContactUs').style.backgroundColor=''; Ajax( 'POST' , 'Album.php?'+GetData+'' , '' , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; case "Categories" : if ($$('Div_Categories').style.backgroundColor == '#627aad' || $$('Div_Categories').style.backgroundColor == 'rgb(98, 122, 173)') { $$('Div_Categories').style.backgroundColor='#6d86b7'; $$('Div_Categories').style.backgroundColor='rgb(109, 134, 183)'; } else { $$('Div_Categories').style.backgroundColor='#627aad'; $$('Div_Categories').style.backgroundColor='rgb(98, 122, 173)'; } $('#Div_Categories_Main').slideToggle(500); break; case "Profile" : Ajax( 'POST' , 'Profile.php?'+GetData+'' , PostData , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; case "Search" : Ajax( 'POST' , 'Search.php?'+GetData+'' , PostData , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; case "Single" : $$('Div_Home').style.backgroundColor=''; $$('Div_SignUp').style.backgroundColor=''; $$('Div_Groups').style.backgroundColor=''; $$('Div_ContactUs').style.backgroundColor=''; Ajax( 'POST' , 'Single.php?'+GetData+'' , PostData , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; case "ForgotPassword" : $$('Div_Home').style.backgroundColor=''; $$('Div_SignUp').style.backgroundColor=''; $$('Div_Groups').style.backgroundColor=''; $$('Div_ContactUs').style.backgroundColor=''; Ajax( 'POST' , 'MainPage.php?'+GetData+'' , PostData , 'MainPart_Separate' , true , 'Picture' , 'Images/Loading_Big.gif' , '' , 'MainPart_Separate' , '' , '200' ); break; default : alert("Error"); } } function Pause(Type) { document.getElementById("Pause").style.height = jQuery(document).height(); if(Type == 'Off') { $("#Pause").animate( { opacity: 0.0 }, 1000); setTimeout(function(){$("#Pause").css("display", "none");}, 2100); } else if (Type == 'On') { $("#Pause").css({'display' : '', 'filter' : 'alpha(opacity=0)'}).animate( { width: "100%", opacity: 0.01 }, 1000); } } function Alert ( Message_Title , Message_Text , Message_Buttons , HideTime ) { if ( Message_Title != '' ) { Write( 'Message_Title' , Message_Title ); } if ( Message_Text !='' ) { Write( 'Message_Text' , Message_Text ); } if ( Message_Buttons !='' ) { $$('Message_Text').style.height='55px'; $$('Message_Buttons').style.height='25px'; Write( 'Message_Buttons' , Message_Buttons ); } else { $$('Message_Buttons').style.height='0px'; Sasan = $$('Message_Text').style.height.replace("px", "") + 30; $$('Message_Text').style.height=''+Sasan+'px'; } $("#Message").css({'display' : '', 'filter' : 'alpha(opacity=0)'}).animate( { opacity: 0.99 }, 1000); if (HideTime) { setTimeout(function(){$("#Pause").animate({opacity: 0.0}, 500);}, HideTime); setTimeout(function(){$("#Pause").css("display", "none");}, HideTime+500); setTimeout(function(){$("#Message").animate({opacity: 0.0}, 1000);}, HideTime); setTimeout(function(){$("#Message").css("display", "none");}, HideTime+1000); } } // ساسان نوبخت function HideAlert ( ) { $("#Pause").animate({opacity: 0.0}, 500); setTimeout(function(){$("#Pause").css("display", "none");}, 500); $("#Message").animate({opacity: 0.0}, 1000); setTimeout(function(){$("#Message").css("display", "none");}, 1000); } function Sasan_Nobakht_Copyright () {tt_Init();} $(function() { var cache = {}; $( "#Search_Input" ).autocomplete({ minLength: 3, delay: 1000, source: function(request, response) { if ( request.term in cache ) { response( cache[ request.term ] ); return; } $.ajax({ url: "Search.php", dataType: "json", data: request, success: function( data ) { cache[ request.term ] = data; response( data ); } }); }, select: function(event, ui) { setTimeout("MainSwitch('Search','','Search='+Get_Value('Search_Input')+'')" , 100 ); } }); var PreImagesLoaded = new Array(); var ImageDir = 'Images/'; var PreImages = new Array( 'BrokenLink.jpg', 'Loading_Circle.gif', 'Loading_Big.gif', 'Loading_Small.gif', 'Paging_Off.gif', 'Paging_On.gif', 'Paging_Over.gif', 'PngFix.gif', 'Refresh.jpg', 'Star_Off.gif', 'Star_On.gif', 'Loading.gif', 'IndexSearch.png' ); for (var i=0 ; i < PreImages.length ; i++) { PreImagesLoaded[i] = document.createElement('img'); PreImagesLoaded[i].setAttribute('src',ImageDir+PreImages[i]); } }); (function($){ $.fn.popupWindow = function(instanceSettings){ return this.each(function(){ $(this).click(function(){ $.fn.popupWindow.defaultSettings = { centerBrowser:0, // center window over browser window? {1 (YES) or 0 (NO)}. overrides top and left centerScreen:0, // center window over entire screen? {1 (YES) or 0 (NO)}. overrides top and left height:500, // sets the height in pixels of the window. left:0, // left position when the window appears. location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}. menubar:0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}. resizable:0, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable. scrollbars:0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}. status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}. width:500, // sets the width in pixels of the window. windowName:null, // name of window set from the name attribute of the element that invokes the click windowURL:null, // url used for the popup top:0, // top position when the window appears. toolbar:0 // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}. }; settings = $.extend({}, $.fn.popupWindow.defaultSettings, instanceSettings || {}); var windowFeatures = 'height=' + settings.height + ',width=' + settings.width + ',toolbar=' + settings.toolbar + ',scrollbars=' + settings.scrollbars + ',status=' + settings.status + ',resizable=' + settings.resizable + ',location=' + settings.location + ',menuBar=' + settings.menubar; settings.windowName = this.name || settings.windowName; settings.windowURL = this.href || settings.windowURL; var centeredY,centeredX; if(settings.centerBrowser){ if ($.browser.msie) {//hacked together for IE browsers centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120)/2) - (settings.height/2))); centeredX = window.screenLeft + ((((document.body.offsetWidth + 20)/2) - (settings.width/2))); }else{ centeredY = window.screenY + (((window.outerHeight/2) - (settings.height/2))); centeredX = window.screenX + (((window.outerWidth/2) - (settings.width/2))); } window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus(); }else if(settings.centerScreen){ centeredY = (screen.height - settings.height)/2; centeredX = (screen.width - settings.width)/2; window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus(); }else{ window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + settings.left +',top=' + settings.top).focus(); } return false; }); }); }; })(jQuery);