function open_mac() {
	site="http://www.macmillanmh.com/products/"
	subjectIndex=document.form_mac.subject.selectedIndex; //Stores the subject index number

	var subjectVal=document.form_mac.subject.options[subjectIndex].value; //Stores the value of the subject index
	var yearVal = '--';
	if (subjectVal=='') {yearVal='--'; myVal=site}
	if (subjectVal=='math') {yearVal=''}
	if (subjectVal=='reading') {site="http://www.macmillanmh.com/";yearVal=''}
	if (subjectVal=='languagearts') {yearVal='2001'}
	if (subjectVal=='socialstudies') {site="http://www.mhschool.com/";yearVal='2009/student'}
	if (subjectVal=='science') {site="http://www.macmillanmh.com/";yearVal='2008/student'}
	if (subjectVal=='health') {site="http://www.mhschool.com/";yearVal='2005/student'}
	
	if(yearVal!='') {yearVal='/'+yearVal}
	
	if (yearVal!='--') {var myVal=site+subjectVal+yearVal+'/index.html' }
	
	if (subjectVal!=''& subjectVal!='music') {openWin(myVal,'mac')} 
	else if(subjectVal=='music'){openWin("http://spotlightonmusic.macmillanmh.com/national/students",'mac')}
	
	else {alert('Please select a discipline')}
}

function open_mhls() {
    var category = document.form_mhls.category.value;
//    var keywords = document.form_mhls.keywords.value;
    var grade = document.form_mhls.grade.value;
	
	//myVal="http://www.mhlearningstore.com/parent/newsearch.php3?store=1&ProductType=0&cartTotal=0"
	myVal="http://www.glencoe.com";
	
//	myVal=myVal+'&keywords='+keywords+'&grade='+grade+'&category='+category+'&ProductSearch=0'
	//myVal=myVal+'&grade='+grade+'&category='+category+'&ProductSearch=0'
	
	if (category!='') {openWin(myVal,'mhls')} else {alert('Please select a discipline')}
}

function open_mhls2() {
    var keywords = document.form_mhls2.keywords.value;
	
	myVal="http://www.mhlearningstore.com/parent/newsearch.php3?store=1&ProductType=0&cartTotal=0"
	
	myVal=myVal+'&keywords='+keywords+'&ProductSearch=0'
	
	if (keywords!='') {openWin(myVal,'mhls')} else {alert('Please enter text to search')}
}

function open_sra() {
    var catid = document.form_sra.subject.value;
    
   	myVal = "https://www.sraonline.com/products.html?PHPSESSID=c7a30429024f0422ca34f6652208216e"
    myVal=myVal+'&tid='+catid
        
    if (catid=='99') 
    {
    	
    	myVal = "https://www.sraonline.com/intervention_home.html?PHPSESSID=c7a30429024f0422ca34f6652208216e"
    	openWin(myVal,'sra')
    } 
    if(catid=='')
    {
    	alert('Please select a discipline')
    }
    else
    {
    	openWin(myVal,'sra')
    } 
}

function open_sra2() {
     var catid = document.form_sra2.keywords.value;
	if (catid!='') {
	openWin('about:blank','sra');
	form_sra2.submit()} else {alert('Please enter text to search')}
}

function open_wright2(mytype,mytext) {
    myVal = 'https://www.wrightgroup.com/products_az.html?PHPSESSID=e736b68b2e9d97a8f94d89644b3f6e14';
	
		if (mytext!='') {openWin(myVal,'wright')} else {alert('Please enter text to search')}
}

function open_wright(mySubject) {
    myVal = 'https://www.wrightgroup.com/category.html?PHPSESSID=e736b68b2e9d97a8f94d89644b3f6e14&cat='+ mySubject;
    
	if (mySubject!='') {openWin(myVal,'wright')} else {alert('Please select a discipline')}
}