﻿	<!--//
function gQV(variable) {  
    var query = window.location.search.substring(1);  
    var vars = query.split("&");  
    for (var i=0;i<vars.length;i++) {    
        var pair = vars[i].split("=");    
        if (pair[0] == variable) {      
            return pair[1];    
        } 
    }
}
 	
function PopImages() { 
window.open('photogallery.aspx?mls=' + gQV('mls') + '&id=' + gQV('id') + '&num=12','_blank','top=100,left=100,width=600,height=500,toolbars=no,scrollbars=yes,resizable=yes'); 
} 

function Nav(url,target)
{
    if (target=='1')
    {
        window.open(url,'_blank')
    }
    else
    {
        window.location.href = url
    }
}

function PopContactForm(sub)
		{
		window.open('PopContact.aspx?subject=' + sub + '&id=' + gQV('id'),'_blank','top=100,left=100,width=620,height=550,toolbars=no,scrollbars=yes,resizable=yes');
		}

function SaveProperty() { 
window.open('savedproperties.aspx?id=' + gQV('id') + '&mls=' + gQV('mls') ,'SavedProperties','toolbars=no,width=550,height=350,resizable=yes,scrollbars=yes'); 
} 


function ViewSaveProperty() { 
window.open('savedproperties.aspx?id=' + gQV('id') ,'SavedProperties','toolbars=no,width=450,height=350,resizable=yes,scrollbars=yes'); 
} 

function PopEmail() { 
window.open('emailsite.aspx?id=' + gQV('id') + '&mls=' + gQV('mls'),'EmailSite','toolbars=no,width=450,height=500,resizable=yes,scrollbars=yes'); 
//alert("hey");
} 

function PopPrint() { 
window.open('PrintDetails.aspx?id=' + gQV('id') + '&mls=' + gQV('mls') + '&print=yes','_blank',''); 
} 

function PopPhotos(mls)
		{
		window.open('photogallery.aspx?mls=' + mls + '&id=' + gQV('id'),'_blank','top=100,left=100,width=600,height=500,toolbars=no,scrollbars=yes,resizable=yes');
		}
		
function PopSaved(mls) { 
window.open('savedproperties.aspx?id=' + gQV('id') + '&mls=' + mls,'SavedProperties','toolbars=no,width=550,height=350,resizable=yes,scrollbars=yes'); 
}


function PopMap(url,ad,ct,mls)
		{
		window.open(url + '?address=' + ad + '&city=' + ct + '&id='  + gQV('id') + '&mls='  + mls,'_blank','width=600,height=400,toolbars=no,scrollbars=no,resizable=no');
		}

function PopCalc(price)
 { 
window.open('calc.aspx?id=' + gQV('id') + '&price=' + price,'Calc','toolbars=no,width=245,height=360,resizable=yes,scrollbars=yes'); 
}

function PopSchool(city,state)
{
window.open('http://nces.ed.gov/globallocator/index.asp?search=1&State=' + state + '&city=' + city + '&zipcode=&miles=&itemname=&sortby=name&School=1&PrivSchool=1&College=1&Library=1','_blank','');
}


function DeleteConfirm(txt)
	{
	if (confirm("Are you sure you wish to delete " + txt + "?") == true) 
		{
		return true;
		}
return false;
 	}

//-->
