﻿// JScript File

// open popup window 

function openpopup(url, windowtarget) 
{
    window.open(
        url, 
        windowtarget,
        'width=1000,height=1000,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0');
}
function openHelppopup(url, windowtarget) 
{
    window.open(
        url, 
        windowtarget,
        'width=600,height=400,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0');
}


/// print page 
function printPage()
{
	if (window.print)
	{
		window.print();
	}
	else
	{
		alert('To print this page please go to the file menu and select print.');
	}
}

function addToFavorites() 
{

    
     url = 'http://www.hostelmania.com';//location.href;
      // Blogger - Replace with <$BlogItemTitle$> 
      // MovableType - Replace with <$MTEntryTitle$>

     title ='HostelMania.com - Home' //document.title;
      // Blogger - Replace with <$BlogItemPermalinkURL$> 
      // MovableType - Replace with <$MTEntryPermalink$>
      // WordPress - <?php bloginfo('url'); ?>
    
	   if (window.sidebar)
	     { // Mozilla Firefox Bookmark
		    window.sidebar.addPanel(title, url,"");		    
	    } else if( window.external )
	    { // IE Favorite	        
		    window.external.AddFavorite( url, title); 		    
		}		    
	    else if(window.opera && window.print) 
	    { // Opera Hotlist
		    return true;
		} 
		
		//window.external.AddFavorite( url, title); 		    
 }
// Hide option 
function AdvancedSearchOff()
{
    var opt = document.getElementById('optin');
    if(opt)
        Element.hide('optin');   
}
// feedback popup
function openpopupFeedback(url, windowtarget) 
{
    window.open(
        url, 
        windowtarget,
        'width=550,height=450,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0');
}